How do you support different screens with Layout or values?



  • I understand there are two ways to support mdpi-hdpi-xhdpi-xhdpi screens:

    1. To make every density your layout with its size and Put it in the relevant folder(layout-xhdpi etc)
    2. Make one layout and make every density values/dimens.xml

    In the first case, the template will be less suitable for the current screen, and in the second, the values of the dimensions to the respective screen will be taken.

    Which one is better?

    If there's something I don't understand, you'll be right. Thank you.



  • I got it right. There's only a third, ideal, to make a rubber mark that looks the same on all the screens. Element weight. Different layouts can be made under the tablet/telephone, but not every density.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2