KB-20071124-001

From Triled Wiki

Jump to: navigation, search
  • Status: opened
  • author: cbazza
  • link: http://groups.google.com/group/android-developers/msg/5184116ac3a9628d
  • Description: Provide a way to read any file from resource folder using its original filename. This would basically provide a similar facility as is available on JavaME. Maybe implement Class.getResourceAsStream in such a way to read files from /res/files with Strings and not integer ids.

[edit] Workaround

E.g. for file /res/drawable/bug.png use such code:

 int resID = getResources().getIdentifier("org.anddev.android.testproject:drawable/bug", null, null); 

[edit] See also

Personal tools