我想微調像以下圖片下拉列表中,如何自定義微調框?
我下面創建這樣
xml
佈局:
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:background="@drawable/edittext_shape"
android:padding="10dp"
android:paddingLeft="4dp"
android:id="@+id/rol_type"
android:layout_marginBottom="2dp">
微調塑造
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item><layer-list>
<item><shape>
<gradient android:angle="90" android:startColor="@color/white" android:endColor="@color/appblue" />
<stroke android:width="1dp" android:color="@color/block" />
<corners android:radius="4dp" />
<!-- <padding android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp" />-->
</shape></item>
<item ><bitmap android:gravity="right|bottom|end" android:src="@drawable/drop_arrow" android:tint="@color/red" />
</item>
</layer-list></item>
</selector>
我的輸出:
我想下面這樣的請幫我在這種情況下:
檢查這個ANS ** ** 1 https://stackoverflow.com/questions/34322156/how-to-move-the-android-spinner -drop-down-arrow-close-to-its-text-text ** 2 ** https://stackoverflow.com/questions/28715036/spinner-with-arrow-in-left ** 3 ** https:/ /stackoverflow.com/a/41463318/7666442 –
@NileshRathod謝謝您的主席下面的答案工作正常。 – Mariyappan