1

Hello guys i know this is an old question but my requirement is different i searched a lot and all answers are outdated not for xxxhdpi and tablets

I always create a new layout of each different screen and place it in respective folder it all works fine but in every project doing every layout is such a pain .so i came across the concept of dimens concept where you can place margins in dimens.xml in different values folder and our app will take it based on screen size

What i need is what are the exact folders i need to take and what should be the percentage of values in each folder some thing like this answer by salman

And if i give margin like

 android:layout_marginTop="@dimen/dim_300" 

If that button comes to centre in small screen ,it should also come in centre in xxxhdpi screen or any other device

and in dimens i will write some thing like this

 <dimen name="dim_3">4.5dp</dimen>

i need answer in this format

folder name and percentage

values-sw480dp 2%

values-mdpi 1%

values-ldpi 0.75%

etc

thanks in advance

Community
  • 1
  • 1
Manohar
  • 22,116
  • 9
  • 108
  • 144

0 Answers0