On Sun, Apr 3, 2011 at 12:54 AM, Raghav Sood <raghavsood@gmail.com> wrote:
Thanks Mark,
Got it workingOn Sun, Apr 3, 2011 at 12:51 AM, Mark Murphy <mmurphy@commonsware.com> wrote:
On Sat, Apr 2, 2011 at 3:14 PM, Raghav Sood <raghavsood@gmail.com> wrote:Presumably, you need a Drawable variable. You assign it the same way
> 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.
you assign anything else in Java. Please consider asking Java syntax
questions on StackOverflow, tagged with the 'java' tag.
Track it yourself, since you are the one assigning the resources to
> Also is there a better way of finding out an imageview's current image
> resource?
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
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/
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en