Use a selector drawable as such: res/drawable/foo.xml: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/foo_focused" android:state_focused="true" /> <item android:drawable="@drawable/foo_not_focused" /> </selector>
Then simply use the foo drawable as your image or widget background. On Jun 23, 1:47 am, Raj <[EMAIL PROTECTED]> wrote: > How to chanage the image on focus and unfocus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---