reznic wrote:
> Yes, i use M5 SDK
> I understand with Resource it works.
> But that to make with BitmapFactory.decodeFile("res/drawable/
> icon.png");

I am assuming, for the purposes of this thread, that 
"res/drawable/icon.png" is a path to a resource you have packaged with 
your application.

If so, then that is a path to a resource, not a file, and decodeFile() 
needs a path on the filesystem. There is no path on the filesystem to 
your resource, as resources remain packaged in the APK file.

If the reason you want to use decodeFile() is because you are 
determining the name of the resource at runtime and all you have is a 
String, you may be able to use Resources#getIdentifier() to convert it 
into an int that you can then use with decodeResource().

If that is not the reason you are trying to use decodeFile() on a 
resource, please explain, and perhaps we can help you further.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: All titles, revisions, & ebook formats, just $35/year

--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to