I\'m using the following code to display a separator view in my activity:
you should try to use as below:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<gradient
android:endColor="#FFFFFF"
android:startColor="@color/blue"
android:angle="90" />
</shape>
</item>
</layer-list>
For more info here LayerList
Hope this help you