0
我使用此代碼表來定義不同事件中的textView顏色。 textView在listView中(10+項),效果(顏色)適用於每個listItem中的每個textView。我如何才能更改僅按下的textView的顏色?如何僅更改按下的textView的顏色?
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
android:state_pressed="true"
android:color="@color/text_white" />
<item
android:state_focused="false"
android:state_pressed="true"
android:color="@color/text_white" />
<item
android:state_focused="true"
android:color="@color/text_white" />
<item
android:state_selected="true"
android:color="@color/text_white" />
<item
android:state_checked="true"
android:color="@color/text_white" />
<item
android:state_selected="false"
android:state_checked="false"
android:state_focused="false"
android:state_pressed="false"
android:color="@color/text_blue" />
</selector>
?以及什麼顏色,當它沒有按下? – FoamyGuy