Your Drawable itself is not part of the UI, but is drawn onto
something that is part of your UI. Therefore, you should attach your
listener to the UI object that displays the Drawable.
See also 
http://developer.android.com/reference/android/graphics/drawable/Drawable.html,
which says "Unlike a View, a Drawable does not have any facility to
receive events or otherwise interact with the user. "



On Sun, Mar 29, 2009 at 10:24 PM, Josh <[email protected]> wrote:
>
> I currently have a drawable and i need to know when it's clicked. Is
> there a way to add an event listener to a drawable?
>
> I realize that there may be a better control to use for me needs so I
> tried ImageButton but Im a bit confused on how to position the
> ImageButton. For example whe i position the drawable i just use
> setBounds. Is there a way to specify the x and y coordinates for an
> image button?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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