android给textView 设置selector没有效果
【中秋佳节】码云陪你一起赏花赏月拿豪礼>>> »
我给textView 设置selector没有效果下面是layout,Relative和下面的三个TextView的background就是设置的selector,我在代码中实现了他们的监听的。
?
1
2
3
4
5
6
<item android:drawable="@color/colorWhite"/>
这一句放在最后。
— 共有 1 条评论 —
pokerWu感谢,成功了!请问这是为什么? (1年前)
评论(1)| 引用此答案| 举报 (2015-07-15 13:59)
0
notreaminotreami 1年前
我觉得选中应该是这个 android:state_selected
— 共有 1 条评论 —
pokerWu我只需要pressed的效果,就只需要点击效果。 (1年前)
评论(1)| 引用此答案| 举报 (2015-07-15 13:31)
0
CalssNotFoundCalssN… 1年前
android:clickable=”true”
— 共有 1 条评论 —
pokerWu设置了的 (1年前)
评论(1)| 引用此答案| 举报 (2015-07-15 13:32)
0
monroemonroe 1年前
引用来自“monroe”的评论
<item android:drawable="@color/colorWhite"/>
这一句放在最后。
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
During each state change, the state list is traversed top to bottom and the first item that matches the current state is used—the selection is not based on the “best match,” but simply the first item that meets the minimum criteria of the state.