android - Shortcut icon too small from assets directory -
this craziest issue. loading custom icons assets directory use application. application loads custom icon , makes shortcut on desktop. of icons 48x48 png files.
on android 2.1 , 2.2 emulator works perfect. on droid x (android 2.2) icons show smaller 48x48.
now kicker, if move 1 of icons drawable directory , load there shows correctly.
any ideas problem droid x?
is there way list of drawables? if there put icons in drawables directory, albeit little ugly dump 100 icons in there.
my code loading icons pretty standard:
assetmanager assets = context.getassets(); inputstream inputstream = assets.open("icons/"+ name); if (inputstream != null) { bitmap bitmap = bitmapfactory.decodestream(inputstream); if (bitmap != null) { return bitmap; } }
one thing mention here when said worked okay on 2.1, 2.2 emulators.. density of emulators used. density has huge impact on how images displayed.
another point, according how android handles images, attributes of small/normal/large/xlarge screens , ldpi/mdpi/hdpi/xdpi applied assets in res , drawable folders. doesnt apply assets folder.
what trying read on how android displays assets , play around playing icon in res folder instead of assets folder. find solution, , increase android knowledge.
Comments
Post a Comment