Got the assigning working. Does this method return a value like R.drawable.imagename or some other thing.
On Sun, Apr 3, 2011 at 12:54 AM, Raghav Sood <[email protected]> wrote: > Thanks Mark, > > Got it working > > > On Sun, Apr 3, 2011 at 12:51 AM, Mark Murphy <[email protected]>wrote: > >> On Sat, Apr 2, 2011 at 3:14 PM, Raghav Sood <[email protected]> wrote: >> > I need to use this function: >> > >> > public Drawable getDrawable (). >> > >> > How do I assign this to a variable and which type of variable do I need. >> >> Presumably, you need a Drawable variable. You assign it the same way >> you assign anything else in Java. Please consider asking Java syntax >> questions on StackOverflow, tagged with the 'java' tag. >> >> > Also is there a better way of finding out an imageview's current image >> > resource? >> >> Track it yourself, since you are the one assigning the resources to >> the ImageView. An ImageView may not have a "current image resource", >> since it may not have been populated with a resource in the first >> place (e.g., loaded with a bitmap from a downloaded PNG file). If you >> are trying to use getDrawable() to tell what your "current image >> resource" is, that will not work. >> >> -- >> Mark Murphy (a Commons Guy) >> http://commonsware.com | http://github.com/commonsguy >> http://commonsware.com/blog | http://twitter.com/commonsguy >> >> _The Busy Coder's Guide to *Advanced* Android Development_ Version >> 1.9.2 Available! >> >> -- >> 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 > > > > > -- > Raghav Sood > http://www.raghavsood.com/ > http://www.androidappcheck.com/ > http://www.telstop.tel/ > > -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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

