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
精彩评论