视频直播源码,Android自定义Spinner样式
视频直播源码,Android自定义Spinner样式
设置Spinner的背景图,如下代码:
<Spinner
android:id="@+id/sp_gender"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_gender"
android:entries="@array/gender" />
shape_gender是自己画的shape:
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="4dp" />
<stroke
android:width="1dp"
android:color="#C8C8C8"
/>
</shape>
</item>
<item>
<bitmap
android:gravity="end"
android:src="@drawable/icon_user_info_pull"
/>
</item>
</layer-list>
以上就是 视频直播源码,Android自定义Spinner样式,更多内容欢迎关注之后的文章