How can i support multiple screen sizes in android with single xml layout file

后端 未结 9 2230
鱼传尺愫
鱼传尺愫 2021-02-06 12:54

I want to support my android screen in multiple screen sizes but i can do it with maintaining multiple xml layout file\'s

but according to requirement it i supposed to b

9条回答
  •  暖寄归人
    2021-02-06 13:23

    You can define multi dimen files, and add dimensions of each view according to screen size in there. You can find detailed answer here

    A set of six generalized densities:

    • ldpi (low) ~120dpi
    • mdpi (medium) ~160dpi
    • hdpi (high) ~240dpi
    • xhdpi (extra-high) ~320dpi
    • xxhdpi (extra-extra-high) ~480dpi
    • xxxhdpi (extra-extra-extra-high) ~640dpi

    Here is the official docs

提交回复
热议问题