I just wanted to know ,how many images (1000 in numbers ) in drawable folder can be stored in android apps
Regards
I just wanted to know ,how many images (1000 in numbers ) in drawable folder can be stored in android apps
Regards
I dont think that number of images is limited. What limits you, is total size of your .apk package. If you want to publish to google play (which i suppose you do want), the .apk size limit is 50MB.
There are other factors that could limit your maximum .apk installation size, you can read more about them in this post
If you look at R.java
, you can see that drawables are assigned an id
in the form of 0xPPPPNNNN
, where P
is the drawable
prefix and N
is the actual id within that area. So, the maximum number may be limited to 2^16
, or 65536
. I haven't tried more than that, but it should be plenty for most needs.
On the other hand, it's likely that you'll reach the file size limit before that. An apk file is limited to 50MB. You can add expansion files to that to bring the total up to 4GB, as described on the Android Developer's Blog.
It mainly depends on the size of your images which you'll hit first. 4GB / 65536 = 64KB
. So, if your average drawable is smaller than that, you may hit the number cap before the size cap.