【发布时间】:2015-10-30 14:19:55
【问题描述】:
我在 android 中有一个微调器,我使用微调器背景。但现在的问题是,我的图像上有一个向下箭头,而 android 添加了另一个向下箭头或类似的东西。现在我想删除android默认箭头图标。
这是图片
安卓java代码
ArrayAdapter<String> dataAdapterOfFromAccount = new ArrayAdapter<String>(context,
R.layout.custom_simple_spinner, accountList);
dataAdapterOfFromAccount.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spFromAccount.setAdapter(dataAdapterOfFromAccount);
custom_simple_spinner.xml 用于自定义布局
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="50dp"
android:ellipsize="marquee"
android:gravity="center_vertical"
android:paddingRight="35dp"
android:background="@drawable/btn_selector" />
我使用这种风格的代码
<style name="mySpinnerStyle" parent="@android:style/Widget.Spinner">
<item name="android:divider">#01579B</item>
<item name="android:dividerHeight">1dp</item>
</style>
现在请,谁能帮我解决这个问题,我想删除那些默认的下拉图标。提前致谢 。 我正在使用 Android 6.0(API 级别 23) 它在 Android 5(API 级别 22)上表现出色,但在 Android 6 中产生了问题。
【问题讨论】:
标签: android xml android-spinner dropdown