如何使用 xml 中定义的多个形状作为 android 中按钮的背景?
假设我有多个形状 xml 文件,例如:-
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#eeffffff" />
<corners android:bottomRightRadius="8dip"
android:bottomLeftRadius="8dip"
android:topRightRadius="8dip"
android:topLeftRadius="8dip"/>
</shape>
我想为按钮背景使用多种形状:-
<Button
android:id="@+id/funkyButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/txt_higher"
android:background="@drawable/funkyShape"/>
我怎样才能组合多个形状以最终得到一个像这样的按钮:-?