开发者

How to store pictures within an app and call them to screen?

开发者 https://www.devze.com 2023-01-02 23:46 出处:网络
I want to create an app that has pictures Ive taken or created and allows users to browse through them.Ive got how to use buttons but I just cant figure out how to store the pictures within the apk fi

I want to create an app that has pictures Ive taken or created and allows users to browse through them. Ive got how to use buttons but I just cant figure out how to store the pictures within the apk file that gets uploaded to market. Im really new to android development and Ive been through some tutorials and have a couple books but for right now Im stuck and would greatly apprec开发者_Python百科iate a push in the right direction. I know it should be easy to do but I just cant find anything describing what Im trying to do.


The easiest way would be for you to store your pictures in the res/drawable folder of your Android project. You can then access these images with myImageView.setResource(R.drawable.name_of_image_without_the_filetype);

Have a look at http://developer.android.com/guide/topics/resources/index.html

0

精彩评论

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

关注公众号