Multiple Icon Images in Honeycomb

I am trying to change the icon of my application so that it matches the blue hundred Honeycomb, but retains green icons for previous versions of Android. I ran into a problem when, if I put the blue 72x72 icon in drawable-xlarge, it uses it correctly in the launcher, but also uses it for the ActionBar. 72x72 is so large that it goes beyond the ActionBar above and below.

My res directory is as follows:

drawable - images for ldpi & mdpi screens (48x48)

drawable-hdpi - for hdpi screens (72x72)

drawable-xlarge - just images for tablets

How to organize the blue icons correctly, so 72x72 is used for launch, and 48x48 is used for ActionBar?

+4
source share
1 answer

Honeycomb launcher will use available hdpi drawings as higher resolution mipmaps on mdpi devices. The mdpi icons should be 48x48. If you want to provide resources specific to xlarge screens, you must provide versions in drawable-xlarge-mdpi, drawable-xlarge-hdpi, etc.

However, if your goal is to provide icons that match the style in Android 3.0, you can use v11 (API level 11) as your identifier instead of xlarge. (e.g. drawable-mdpi-v11, drawable-hdpi-v11)

The API level version definitions in your resource organization can be useful in other cases where the system style has also changed, for example, the style of the notification icon has changed to 2.3.

+11
source

Source: https://habr.com/ru/post/1341479/


All Articles