我有一個奇怪的問題,有關從我的摩托羅拉Defy 2.2中顯示從微調選擇的文本。我創建了一個有一個微調從其中用戶可以選擇一個選項的佈局,但問題是即使我從微調列表中選擇一個項目不要在box中顯示該項目。我知道默認情況下defy中的文本顏色是白色的,我的佈局背景也是白色的,這會隱藏文本,但我也指定了旋轉器的佈局中的文本顏色屬性爲黑色,它仍然不顯示text.My佈局如下所示:微調只顯示Motorola Defy 2.2上的選定文本?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20.0dip"
android:layout_marginRight="20.0dip"
android:layout_marginTop="7.0dip"
android:background="@drawable/rectangle_shape" >
<TextView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="right|center"
android:gravity="right|center"
android:paddingBottom="7.0dip"
android:paddingLeft="10.0dip"
android:paddingRight="8.0dip"
android:paddingTop="7.0dip"
android:text="Concession"
android:textColor="@color/white"
android:textSize="16.0sp" />
<Spinner
android:id="@+id/CSpinner"
android:layout_width="0.0dip"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:background="@drawable/rectangle_shape_middle"
android:entries="@array/C_arrays"
android:paddingLeft="6.0dip"
android:prompt="@string/C_prompt"
android:textColor="@color/black"
android:textSize="16.0sp" />
<ImageView
android:id="@+id/SpinnerSelector"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="right"
android:background="@drawable/rectangle_shape_end"
android:paddingLeft="3.0dip"
android:paddingRight="3.0dip"
android:src="@drawable/ic_navigation_expand" />
</LinearLayout>
</LinearLayout>
的代碼上的其他手機一樣的三星Galaxy S2,S3做工精細,並注意爲well.Please幫助我。
由於提前
我認爲微調不具有屬性android:textColor.Maybe我需要使用java來做到這一點。 – user818455
我發現我的解決方案[這裏](http://stackoverflow.com/questions/6159113/android-where-is-the-spinner-widgets-text-color-attribute-hiding) – user818455