On Thu, Apr 5, 2012 at 2:54 PM, Matt Clark <[email protected]> wrote:
> I now have the ImageView assigned to a variable, but the value I need to
> pass to the second activity is the R.id.xxx of the drawable inside of the
> image view..
> How would I go about getting this ID?

Hold onto it somewhere. You cannot get it directly from an ImageView,
as an ImageView can display images that are not resources (e.g., local
files).

If nothing else, you can stash a copy of the ID in the ImageView via
setTag() and retrieve it later via getTag().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

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