我有一个图像和文本视图的自定义微调器布局,但我注意到,取决于制造商的皮肤,你不能看到文本,因为颜色ie。白色白色,黑色黑色。基于背景颜色更改微调器文本颜色
我也注意到,我的其他非自定义旋转器都没有这样做,似乎自动改变,所以我的问题是我如何获得文本颜色改变,以便它可以被读取?
这是一个非定制微调
ArrayAdapter<CharSequence> cAdapter;
cAdapter = ArrayAdapter.createFromResource(this, R.array.colors,android.R.layout.simple_spinner_item);
int cSpinnerDD = android.R.layout.simple_spinner_dropdown_item;
cAdapter.setDropDownViewResource(cSpinnerDD);
color.setAdapter(cAdapter);
定制微调我只是重写视图把图像与文字
这里是它
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/icon_txt"
android:paddingLeft="25dp"
android:textSize="18sp"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
这不是一个答案 – tyczj 2014-11-12 14:30:13