Android 'drawable' folders selection issue -
i building android application (a game). have created ldpi, mdpi , hdpi of of images (the dimensions of of these images have been appropriately calculated).
when test game on samsung s3, value of below code 2.0.
getresources().getdisplaymetrics().density; this correct, , images used in application automatically selected drawable-hdpi folder.
however, when test application on google nexus one, above code evaluates 1.5 (correctly), , yet images drawable-hdpi folder still automatically selected.
for reference, loading bitmaps in manner:
bitmapfactory.options bmpfactoryoptions = new bitmapfactory.options(); bmpfactoryoptions.inscaled = false; bitmap examplebitmap = bitmapfactory.decoderesource(gamepanel.getresources(), r.drawable.example, bmpfactoryoptions); edit: removing second line still not fix issue.
am doing wrong? if so, what? alternatively, there workaround?
many in advance.
the samsung galaxy siii xhdpi device.
the nexus 1 hdpi device.
reference:
http://blog.blundellapps.com/list-of-android-devices-with-pixel-density-buckets/
therefore, because don't have xhdpi resources, uses next closest siii (hdpi).
Comments
Post a Comment