开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜