Khi tôi ListViewItem
được tô sáng, tôi muốn văn bản chuyển sang màu trắng. Làm thế nào tôi có thể xác định điều này?Cách xác định ColorStateList cho TextView?
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:color="@color/testcolor1"/>
<item android:state_pressed="true" android:state_enabled="false" android:color="@color/testcolor2" />
<item android:state_enabled="false" android:color="@color/testcolor3" />
<item android:color="@color/testcolor5"/>
</selector>
Đoạn mã có gì? –
Tôi không chắc mình hiểu ý của bạn là gì? –
Tại sao bạn đăng mã? Những gì nó cho thấy? (làm thế nào để bạn sử dụng drawable?) –