Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Discussion > Android Lounge

Android Lounge A place for general Android discussion and questions.



Reply
 
LinkBack Thread Tools
Old January 21st, 2012, 06:31 PM   #1 (permalink)
New Member
 
Join Date: Nov 2010
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation How to get the URI of a Drawable in code

Hello,

I am working on an Android application where I deliver some built-in images and give the user the option to download some more from the web to use in the application. At some point in my app, I look at an ImageView in my layout and want to determine if the Drawable inside is an in-built resource or an image I have downloaded from the web to the SD Card.

Is there any way to extract the URI of the Drawable used in the ImageView? This way I would be able to see if it is a resource or a downloaded file.
Here is my code so far:
Code:
ImageView view = (ImageView) layout.findViewById(R.id.content_img);
Drawable image = view.getDrawable();
Any help will be greatly appreciated!

bilbo7833 is offline  
Reply With Quote
Sponsors
Reply

Bookmarks

Tags
android, drawable


Go Back   Android Forums > Android Discussion > Android Lounge User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 11:04 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo