layout compatibility is a very important part of any project
Sorry, but you should use a diameter to solve this problem. and I think the best way to design is to use density.
you can use dimens-hdpi or dimens-mdpi or ...
and it can use dimens-small or dimens-large or ...
and can use both of them together. e.g. dimens-larg-mdpi
but it is so hard to develop.
i using dimensions the smallest screen width is the density of use, and I think you can handle all phones or tablets into 4 or 5 sizes.
like this image 
Typical numbers for dp screen widths are:
- 320: phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc.).
- 480: Tweener tablet such as Streak (480x800 mdpi).
- 600: 7-inch tablet (600x1024).
- 720: 10-inch tablet (720x1280, 800x1280, etc.).
- If you have a device that does not support one of them, you can add another smallest screen width for this.
You can read more here , here , here, and this one will help you find out the pixels of your phone per inch.
Example:
you have a phone with a size of 1080 * 1920 pixels and a size of 5 ".

- The first formula will help you calculate the pixel per inch (dpi).
- the second formula will help you calculate the pixel ratio.
- and the last formula will help you calculate dp.
This phone has a width of 392 dp and a minimum width of 320.
if you like to use dpi the pixel ratio can help you.
- ldpi => Pixel Ratio = 0.75
- mdpi => Pixel Ratio = 1.0
- hdpi => Pixel ratio = 1.5
- xhdpi => Pixel Ratio = 2
- xxhdpi => Pixel Ratio = 3
- xxxhdpi => Pixel Ratio = 4
mehrdad khosravi Apr 24 '16 at 9:45 2016-04-24 09:45
source share