0
我想當我選擇一個Item時,顏色名稱會改變。 但我的問題是,文本更改,但時間,並沒有保持帳戶,並不會改變顏色,只放在粗體文本和當我選擇其他項目之前,項目再次成爲一樣,因爲它是在開始。帶自定義選擇器的ListView
list_selector.xml
<item android:drawable="@color/android:transparent" android:state_enabled="true" android:state_pressed="true"/>
<item android:drawable="@color/android:transparent" android:state_enabled="true" android:state_focused="true"/>
<item android:drawable="@color/android:transparent"/>
list_view.xml
<ListView
android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:listSelector="@drawable/list_selector"/>
row_selector.xml
<item android:drawable="@color/col" android:state_enabled="true" android:state_pressed="true"/>
<item android:drawable="@color/coll" android:state_enabled="true" android:state_focused="true"/>
<item android:drawable="@color/colll" android:state_enabled="true" android:state_selected="true"/>
print_item.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/row_selector">
我想知道我怎麼能救我行的狀態,當她是選擇和我如何改變這種選擇的顏色?
有什麼用?請填寫答案或刪除它。 – laalto