-2

Hello guys and girls.

As i already asked, is someone here who can give me a hint how to calc the right ammount of dimens?

As far as i know:

  • dimens "small" support devices with a <=3,4 inch screen
  • dimens "normal" from 3,4 to 5,0
  • dimens "large" from 4,5 to 7
  • dimens "xlarge" from 7 to +

these are relative to the physical screensize in inches and NOT the correct numbers. Got it from a graph on this website without labeling: https://developer.android.com/guide/practices/screens_support.html

also there are dimens which depends on the ammount of pixels.

  • ldpi
  • mdpi
  • hdpi
  • xhdpi

Do i really need to have 16 different folders, to prevent that a wrong layout is shown on the device, like; small-ldpi,small-mdpi,small-hdpi,small-xhdpi,normal-ldpi,normal-mdpi,normal-hdpi and so on. If so, do i need to create 16 AVD´s to test each layout? Also, the emulator is not so accurate with displaying the layout as it is on a real device. So do i need to have 3 or 4 physikal devices with the most common screensizes and resolutions.

If i only consider the screensize in inch, is it still possible to have a consistent layout?

The resolution of the Icons: If i want to have the icon in a consistent relation to the layout, how much icons should i create? im thinking about 4 different sizes of each icon( ldpi,mdpi,hdpi and xhdpi) but every icon is in 4 different folders small/normal/large/xlarge.

Thank you for your help, Phil

Quote: Like my IT teacher said, a good programmer doesn´t need to know anything, he only needs to know where to find it. cheers

P.S, im asking cause i don´t like to spend hours and hours in xml if someone can say " listen, 5 folders are enough. 16 folders are 'nice to have' maybe a 6th because of this new 21:9 hype."

  • We had only desktop applications in java, c++ and html.. deeper development like big android applications wherent part of our school. but ty for confirm my predjustice about this forum. I only ask someone who is better in app development for an advice. It is a polite question and all sources i can find via google or stackoverflow doesn´t help me very much. But just comment useless stuff under normal questions and don´t forget to downvote (y) – Nostramärus Jun 22 '17 at 14:14

1 Answers1

0

i was also running with same issue then i used this awesome library a scalable size unit - SDP Intuite

No need to worry on different density device this library will handle it

thanks

Jafar Sadiq SH
  • 715
  • 9
  • 22