To do this you will need to give your LinearLayout a background that supports states. For instance:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/pressed_application_background_static" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/pressed_application_background_static" /> <item android:state_focused="true" android:drawable="@drawable/focused_application_background_static" /> <item android:state_focused="false" android:drawable="@android:drawable/empty" /> </selector> On Wed, Apr 9, 2008 at 11:20 AM, Mark Wyszomierski <[EMAIL PROTECTED]> wrote: > > Hi Romain Guy, > > The LinearLayout instance is indeed clickable, but is there a way to > get it to flash orange like a normal button? I guess that's the only > part missing to making it look more button-ish, > > Thanks, > Mark > > > On Apr 9, 12:39 pm, "Romain Guy" <[EMAIL PROTECTED]> wrote: > > Actually there is. Home for instance uses a LinearLayout to create the > > buttons on the right. Simply call setClickable() and setFocusable() on > > your LinearLayout then add an OnClickListener. > > > > > > > > > > > > On Wed, Apr 9, 2008 at 9:23 AM, Hielko <[EMAIL PROTECTED]> wrote: > > > > > It's possible to implement, but there is no default method that can do > > > that for you. > > > > > On Apr 9, 5:39 pm, Mark Wyszomierski <[EMAIL PROTECTED]> wrote: > > > > Hi Everyone, > > > > > > Is there any way to make a whole LinearLayout instance behave like a > > > > big button, so it flashes when clicked? > > > > > > Similar to an ImageButton, but I'd like to be able to set the entire > > > > layout as the button really. > > > > > > Thanks, > > > > Mark > > > > -- > > Romain Guywww.curious-creature.org- Hide quoted text - > > > > - Show quoted text - > > > -- Romain Guy www.curious-creature.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

