As you know if you put dimensions and size in dp it will almost same in all devices. I say almost because of bucket range. for example in hdpi that presnets with 240dpi a device with 200dpi and 279dpi all use hdpi resource and dimens folder and same size in pixel:
px = dp * (dpi/160)
so for example an object with 300dp size will be (dp/dpi=inch) 300/200 = 1.5 inch in first device (200dpi) and in another device it will be 300/279=1.07 inch. (279dpi device) so as you see there is too much difference between high and end of range hdpi and your UI not just same in inch.
Ok I found best solution for solving this problem is divide bucket to more specific with sw and change dp size in dimens.xml
for each bucket range. but I do not know how to divide bucket and second how to create values for them!
problem is what is the proper folder range for this? what is the best practice for divide sw sizes for achieving this. (sw160, sw320, sw480 or what?) and how to add value for dimensions?
UPDATE
some friends say that why you won't use in instead of dp and this is my answer:
- Android get inch with the same formula (screen Resolution / dpi = inch) so the problem is same and it's is not exact in all devices.
- Android told that using inch and mm and cm is not recomended.