在你的活动,你应该有这样的事情: (基本上你所得到的微调,并设置它的适配器此适配器是负责加油吧)
Spinner spinner = (Spinner) findViewById(R.id.your_spinner_id);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.your_selected_spinner_item, myArrayList<String));
adapter.setDropDownViewResource(R.layout.your_dropdown_item);
spinner.setAdapter(adapter);
而且你可以拥有这个XML :(把它们放在RES /布局)
your_selected_spinner_item.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myLayoutID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textSize="20sp"/>
而且还 your_dropdown_item.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myDropdownLayoutID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textSize="20sp"/>
我看不到你的形象。请显示您的微调器XML代码。 – joao2fast4u 2015-03-02 23:03:38
您是否尝试过更改自定义布局中的文本颜色? – Kony2013 2015-03-02 23:04:39
@ Kony2013是的,我试过但不起作用 – quasiaffatto 2015-03-02 23:08:23