简体   繁体   中英

working with assets folder or drawable folder

I am creating an app using android studio. i created the assets folder and created sub directories under it for each activity i am using (each one has a different set of images). But on the other hand i want to support multiply screen resolutions which as i read is supported using drawable folder's, also drawable doesn't support sub directories. I am using API 19 at the moment.

Putting all the images in drawable folder will be a bug mass.

How can i achieve my goal of order in my images and supporting multiple screen resolutions

Thank you in advance

there are subfoldes in drawable. take a look at this http://developer.android.com/guide/practices/screens_support.html

The drawables folders allow you to save various resolution versions of an image into separate folders. The OS will choose the right asset based on the device screen density for you when you ask for @drawables/image_name. /assets is more like a normal file directory. In general if you pull from assets you need to handle resolution differences on your own.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM