I have a LinearLayout that has 2 children: a ImageView aligned left and a TextView aligned right.
I've set the background of the LinearLayout to be a @drawable XML resource that has two <item>
tags. One of them has android:state_pressed="true"
. Also, the LinearLayout has android:clickable="true"
.
When the LinearLayout is clicked it correctly changes its background to the android:state_pressed
style, but clicking on one of its children doesn't propagate the click action up to the LinearLayout.
Is there a way to easily achieve a click state on the parent view when a child view is clicked?