layout management in android

后端 未结 3 688
长发绾君心
长发绾君心 2021-01-03 05:43

I have created an app for all screen resolutions. So for that, according to the documentation I have created a list of resource directories in an application that provides d

3条回答
  •  醉话见心
    2021-01-03 06:31

    @hasMukh has pointed the right direction, but if you want the layouts for those 4 devices to be more precise. I suggest you to use the "layout-density-resolution" format for layout folder naming. As an example,

    for HVGA(320x480) layout folder should be "layout-hdpi-480x320" for WQVGA(240x400) layout folder should be "layout-ldpi-400x240" for WVGA(480x800) layout folder should be "layout-mdpi-800x480" for WXGA(720x1280) layout folder should be "layout-mdpi-1280x720"

    This method is only good if you are planning to target specific few devices..and you can keep only one drawabale folder and use dp values for layouts.

提交回复
热议问题