简体   繁体   中英

Layouts for different screen sizes

I was trying to create different layouts for different screen sizes with swXXXdp layout files. Unfortunately I still can't separate 5,0" from 6,3" as visible on attached image. Both sizes still use the same file: layout-sw412dp. Any idea for this?

屏幕尺寸

I suggest you yo use Constraint Layout, maybe it could be useful for your goal...

ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It's similar to RelativeLayout in that all views are laid out according to relationships between sibling views and the parent layout, but it's more flexible than RelativeLayout and easier to use with Android Studio's Layout Editor.

doc

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