android problem:Read file problem res/raw/img/img123.jpg
I'm beginner of android. And I get a problem. Can I get the file under the folder I create in res/开发者_开发百科raw?
For example: res/raw/img/img123.jpg
Can I get the id or use the file img123.jpg?
if yes,how can i do that?
Please read this: http://developer.android.com/guide/topics/resources/drawable-resource.html
Instead of accessing it as a raw
resource, try creating a res/drawable/img123.jpg
to easily access it using
getResources().getDrawable(R.drawable.img123);
精彩评论