简体   繁体   中英

Supporting multiple screens across different dpi and screen sizes

I have a two circles in a background image and I want to put two buttons in them. I am using relative layout. I have created several layout folders and images using guideline (layout, layout-large etc). But still the buttons are somewhat up or down in different actual devices. I am assuming this is because of Android default screen density bucket. Because if I provide only one layout for 320 to 479 dpi screen, It is possible that there could be a lot of devices in between. And my only layout for this range is surely going to be distorted? How do you design for supporting multiple devices? Thanks for you help in advance!

Add all the listed dimens.xml in vlaues folder for your project and manage them accordingly

values-sw320dp
values-sw360dp
values-sw480dp
values-sw600dp
values-sw720dp

This will definitely solve your problem of supporting multiple devices.

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