The framework offers "stateful" drawables that automatically change
based on user interaction, such as focus or touch.  Here's an example
of the default Button background is defined:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/drawable/btn_default.xml;hb=cupcake

When a drawable like this is set as a android:background or
android:src, the framework will handle swapping out the icon based on
state for you.  (You don't need to write onKeyDown, etc.)

j

On Sun, Aug 2, 2009 at 11:07 PM, Venkatesh D<[email protected]> wrote:
>
> Hi all,
>
> I am developing an application which has many cool image buttons. On
> press or click of any image button there is no feed back to the user
> either color change or any kind of contrast change in the button.
>
> I don't prefer to have multiple images for a single image button
> loaded onKeyDown and onKeyUp callbacks, simply to avoid the size of
> the APK.
>
> Is there any default property provided by the framework which just
> takes care of Image Button press and release events with some kind of
> feedback to the user on both the events?
>
> >
>



-- 
Jeff Sharkey
[email protected]

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to