To find out which button was clicked, you can do this:
1) when adding the imagebutton, setTag("b1");
2) when getting the event onClick, getTag() == "b1".

On Sun, Dec 7, 2008 at 9:31 PM, Mark Murphy <[EMAIL PROTECTED]> wrote:

>
> Josh Dobbs wrote:
> > Yes. I understand that but i am not sure which property to check.
>
> Property?
>
> ImageButton btn1=new ImageButton(this);
>
> btn1.setImageResource(R.drawable.foo);
>
> If you're asking, using the above example, how to find out later that
> btn1 was set with R.drawable.foo, you can't, AFAIK. Images can come from
> a wide range of sources, only one of which is image resources, and so
> only one of which has an identifier.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 2009
> http://www.bignerdranch.com/schedule.shtml
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to