TextView啥的设置selector时会遇到无效的问题。
一般来说是这样的,
首先,true的要放在上面,false的要放在下面
其次,当是background的换色时,item要用drawable值是drawable的
然后,当是textColor时,item要用color值也是color的
下图是background的selector,true在最上面,drawable是字段名,值是drawable

下图是textColor的selector,true在最上面,color是字段名,值是color

网友评论