Android: Accessing images from assets/drawable folders Android: Accessing images from assets/drawable folders android android

Android: Accessing images from assets/drawable folders


I don't think so there is bit difference in performance of using these two folders, I think using drawable folder you can get easily images (All will be indexed in the R file, which makes it much faster (and much easier!) to load them.), and If you want to use it from asset then you have to use AssetManager then using AssetFileDescriptor you have to get those images.

  • Assets can also be organized into a folder hierarchy, which is notsupported by resources. It's a different way of managing data.Although resources cover most of the cases, assets have theiroccasional use.

  • In the res/drawable directory each file is given a pre-compiled IDwhich can be accessed easily through R.id.[res id]. This is useful toquickly and easily access images, sounds, icons...


As far as I know, there shouldn't be big difference but I would rather go with Drawable.

Drawable gives you, beside indexing, option to fight with screen density fragmentation and Assets shouldn't depend on density. Having big pictures on smaller screens and/or lower specification phones (RAM, CPU) can cause real trouble and influence usability and app responsivity.


I think that the main difference between these two is that Drawable folder is indexed and you can gain use of the android Alternative resources load... So I think that there is no difference of performance between these resource folders.