Reputation: 3
For support multiscreen devices android, typically using a drawable-xhdpi, drawable-hdpi, drawable-mdpi, drawable-ldpi for resources images. For using it with assets folder how to implement it? Do I need to create separate folder like assets-hdpi, assets-mdpi? Or what?
Upvotes: 0
Views: 287
Reputation: 3751
Assets folder is the folder using for stored raw data/resource such as media/audio files, text file or html ... which can be used for every screen size/density. For support multi screen you only need to develop different layout/drawable file and put them into corresponding folder as you said above and don't need to make different raw data for multi screen.
Upvotes: 3
Reputation: 13027
No. You can't create such folders. But you can name your files different names (this example is for fonts) e.g:
font_for_large_screen.ttf - for big screen
font_for_small_screen.ttf - for small screen
and then have this strings in res -> values . As you may know, you can differentiate string values by screen sizes (and other characteristics). So, on on hdpi screen font value will be :
font_for_large_screen.ttf
on small :
font_for_small_screen.ttf
and you can grab appropriate font (or other file) from assets. Hope this will help you.
Upvotes: 1