I have the following code that generates a gradient:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:angle="90"
android:startColor="#2e3192"
android:endColor="#00ffe9"
android:type="linear" />
</shape>
</item>
</selector>
And this other xml of a layout that in a linerlayout takes that gradient and uses it in background color:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ForgotPassword">
<LinearLayout
android:background="@color/azure"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
app:cardCornerRadius="10dp"
android:layout_margin="16dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:background="@drawable/background_gradient_color"
android:layout_marginTop="40dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
My query is, how can I modify that xml or the linerlayout to achieve what I show in the image on the right (I currently have what is shown in the one on the left)