0

Is there any way to create specific layout folder for Samsung galaxy J2(2015) ? I created layout-hdpi folder and it load ui from that folder but my problem is Huawei T3 tab model also load Ui from that folder because their screen sizes difference UIs are not matching for both devices.

SahdevRajput74
  • 754
  • 7
  • 18
  • Check this, hopw this will help you. An android SDK that provides a new size unit - sdp (scalable dp). This size unit scales with the screen size. It can help Android developers with supporting multiple screens. https://github.com/intuit/sdp – Chetan Kumar Patel Mar 21 '18 at 04:36
  • can use constraintlayout or layout_weight to alleviate the issues of differing screen sizes – caitcoo0odes Mar 21 '18 at 05:23

1 Answers1

0

Aside from named densities like hdpi, xhdpi ,..., you can also name your folders with width and height like w720dp will provide resources for devices that have at least 720dp of width.

Aside from this, in some cases you can make your layout flexible to adjust many screen sizes (like using ConstraintLayout).

Adib Faramarzi
  • 3,798
  • 3
  • 29
  • 44