У меня есть кнопка в форме Android, я хотел, чтобы она была двухцветной.но не градиент.только цвета как есть, как это можно сделать?ниже мой drawable.Я не хочу, чтобы это градиент, просто два цвета, как есть.
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:angle="0"
android:endColor="#e574bd"
android:startColor="#874dbc"
android:type="linear" />
<corners
android:radius="20dp"/>
</shape>
Редактировать: я прикрепил изображение, как я хочу, чтобы оно выглядело
<RelativeLayout
android:id="@+id/registration"
android:layout_width="match_parent"
android:layout_height="@dimen/buttonHeight"
android:paddingEnd="@dimen/default_margin"
android:paddingStart="@dimen/default_margin"
android:background="@drawable/abovexml"
android:gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:id="@+id/sadad2"
android:src="@+id/theimagewithoutwordingchangepassword"
android:scaleType="fitXY"
android:layout_height="@dimen/buttonHeight"/>
<TextView
android:id="@+id/loginText"
android:layout_width="match_parent"
android:layout_height="@dimen/buttonHeight"
android:layout_centerInParent="true"
android:gravity="center"
android:text="@string/changepass"
android:textColor="@android:color/white"
android:textSize="@dimen/buttonSize"></TextView>
</RelativeLayout>