Android supporting all tablets - categorize drawables and layouts

后端 未结 5 577
野的像风
野的像风 2021-01-31 11:40

I have seen many thread discussing this problem in stackoverflow (like this, this and this), and I have read the documentation about supporting multiple screens, and designs. Bu

5条回答
  •  鱼传尺愫
    2021-01-31 12:35

    What I have come to use is:

    • one layout folder (or second one: layout-land)
    • a few values folders with dimens.xml (-hdpi, -large, -xlarge) for different sizes, fonts etc.
    • drawables: -hdpi with most images, they scale down for all the phones; -large for 7" tablets; -xlarge for 10" tablets. Or just -hdpi and -large.

    I might verify this approach, i.e. use -sw600dp and -sw720dp but for now it works.

提交回复
热议问题