I have a LinearLayout that I\'ve styled to look like a button, and it contains a few text/ImageView elements. I would like to make the whole
First you'll want a selector to define the different states. For example, in an XML file:
I haven't tried it, but you can possibly set the LinearLayout's android:background to this selector, and set android:clickable to true and it'll work.
If it doesn't, you could switch to using a RelativeLayout, and make the first element a button with this selector as the background and fill_parent for its layout width and height. In this case, just use a regular Button and set android:background to your selector. You don't have to put text on your button.