How to support different screen size in android

前端 未结 9 809
天涯浪人
天涯浪人 2020-11-22 05:29

I\'m developing an app in android and I have to support all different screen sizes and density. So i\'ve created different folder for layout : layout-small layout-larg

9条回答
  •  被撕碎了的回忆
    2020-11-22 05:59

    You can use sdp size unit instead of dp size unit. The sdp size unit is relative to the screen size and therefor is often preferred for targeting multiple screen sizes.

    Use it carefully! for example, in most cases you still need to design a different layout for tablets.

提交回复
热议问题