Thanks for the info. As result of another discussion I already had a
look at the DisplayMetrics class. They clearly state there, that I
can't rely on dip because it's just based on the default density
(160dpi, 240dpi, 320dpi, etc.) which is nearest to the device's real
density. So this (official)
The quantized density value (160/240 etc) is used by resource loading code,
and so can be expected to be there. Some devices deliberately use a value
that is not the closest match to the actual physical density, but it's the
same for all applications on the device.
The xdpi and ydpi can sometimes
Kostya,
I'll have to keep this in mind. I guess the hardware manufacturers decide
if they want to follow the rules fully or not in a lot of cases. You would
think that this would be one of the things that manufacturers would do
correctly since it's so easy to get right from their perspective.
I don't think you will be able to do this with a XML layout. You probably
want to take a look at this
http://developer.android.com/reference/android/util/DisplayMetrics.html#xdpi
There is both xdpi and ydpi. That should be checked to get the actual dpi in
both directions and then a view
4 matches
Mail list logo