简体   繁体   中英

Android App - Screen Size not Scaling after creating different layout folders

I have been trying to make my Android app scale to different screens. Therefore I read about this in the Android guides and found that I needed to make different size images and different layout folders.

I made different layout folders and played around with the XML files until I got it to display something I was happy with on a different size screen.

Also, I changed my images into the different formats (eg xhdpi and mdpi). I was a little confused about this, since I don't know what pixel sizes are what in comparison to mdpi (for example is 100x100 an xhdpi or an mdpi?)

Anyway, when I run my app on different size phones it doesn't change layout. Is there something I need to write in my java code (in the activity file) to make it change layout?

Thanks in advance!

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