I have a LinearLayout, mRoot, and it has two child of TextView, such as
private TextView mNameView;
private TextView mValueView;
and I also set these TextView with ColorStateList. Now, the question is when I press the mRoot, those TextView can’t change the color of text.
But when I make the mRoot as the item of ListView, then when I press the item, it can change the color of text.
Can anyone help me with this?
Try setting the
android:duplicateParentStateattribute totruein yourTextViewdeclarations in XML.