I am using a Linear Layout inside of a dialog, and have some TextViews inside that layout that I would also like to change color based on the “pressed” state of the Layout that is their parent. They have a state-list for what color they should be, but it seems that when the layout is clicked, the Views beneath it are not given that “clicked” state.
How could I make the TextViews change color when their parent layout is clicked?
The easiest way is just to pass the event down into whatever the child views are. You can extend TextView and add a method that you can call from the Layout’s onclick handler.
then in your Activity…