I have an image and a TextView below the image which is the title for the image. When I touch the text i want to change the state of the image to selected. I capture the touch up and touch down events to change the state of image to selected and unselected respectively.
I want to implement touch cancel i.e. if I touch inside the TextView and drag outside and remove my finger the image state should be set to unselected. How do I know if a touch lies within a view?
My application target level is 7.
Answering my Question. I solved this by placing the image view and text view inside a view. And setting the property duplicateParentState to true for the image view.