您好,登錄后才能下訂單哦!
可以通過設(shè)置Spinner的屬性android:divider來添加列表項的分隔線,具體步驟如下:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<size android:height="1dp" />
<solid android:color="@color/divider_color" />
</shape>
<resources>
<color name="divider_color">#CCCCCC</color>
</resources>
<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/divider"
android:dividerHeight="1dp" />
通過以上步驟,就可以實現(xiàn)在Spinner控件的列表項之間添加分隔線。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。