Remove hidensity from packaging (honeycomb)

This code

final ApplicationInfo ai = getPackageManager().getApplicationInfo("com.company.hello", 0); final Drawable d = getPackageManager().getApplicationIcon(ai); 

pull out 48x48 (mdpi) pullable even on my hidensity HoneyComb device .

Given that I can increase the ejected Bitmap.createScaledBitmap, I ask how to extract the hi density icon that already exists. The getDrawableForDensity method is not available for sdk <15, but I am not happy to call the zoom function for each icon that I have to draw when it is available in the package for free.

Edit for bounty

Having forgotten about the display density of my device for a while, the question is: if you have your own package, for which we definitely know the 72x72 icon in the relative hdpi res folder, how can I extract this icon from another package?

THIS FUNCTION is not available in Honeycomb.

+6
source share
1 answer

to find a straight line with good density, you should simply try:

 mContext.getResources().getDrawable(R.drawable.mydrawable); 

What is the problem? If android has a 48x48 icon, it means the icon is good or you did not install the icon in a good res / drawable folder.

+1
source

All Articles