简体   繁体   中英

How can I make widgets adjust their size to look the same on every device?

I was wondering how to make my interface's TextViews, ImageViews, Margins, etc... look the same on all devices no matter if I'm using it on a phone or a tablet. I was told that using fragments would help, but I don't seem to understand. Sorry for the babyish question...

You can use constraint layout and set the widget's height and width according to the screen's width and height. Or you can have different layout files for diffrent screen densities.

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