DisplayMetrics xdpi and ydpi
By : Ba Si Duong
Date : March 29 2020, 07:55 AM
may help you . Seems, no. For my Samsung Galaxy S (GT-I9000) they are the following (reported by Android): code :
metrics.xdpi=234.46153
metrics.ydpi=236.27907
|
xdpi image of ldpi in android
By : Leo Song
Date : March 29 2020, 07:55 AM
will be helpful for those in need yes. Do not put that icon in drawable-ldpi folder. If your app runs on ldpi device and OS does not found the resources in drawable-ldpi. Then it will use resources from drawable-xhdpi after scaling.
|
SPH-L710 (Sprint Galaxy S III) running 4.4.2 misreports xdpi and ydpi
By : user2712927
Date : March 29 2020, 07:55 AM
With these it helps From API 17 you can call getRealMetrics to get more accurate results. code :
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getRealMetrics(dm);
xdpi = dm.xdpi;
ydpi = dm.ydpi;
|
Best Practice: res folders - Xdpi vs swXXXdp
By : user2989460
Date : March 29 2020, 07:55 AM
Any of those help google lists its newer devices in sw buckets rather than in dpi buckets.
|
Has anyone used xdpi, ydpi and gotten correct results
By : juditdidit
Date : March 29 2020, 07:55 AM
help you fix your problem It is correct on my Nexus One, but not on my Galaxy S2 (T-mobile). So I wrote some code to fall back on the less accurate measurement. Basically, if xdpi and ydpi are not within 5% of the generic density, use the generic. Who says fragmentation isn't a problem? Google's product test suite for certification must not exercise this part of the API.
|