4

I'm trying to change my app icon to make it match the blue of Honeycomb but maintain the green icons for previous Android versions. I've come across a problem where if I put the blue 72x72 icon in drawable-xlarge, it uses it correctly in the launcher but it also uses that for the ActionBar. 72x72 is so large, it extends beyond the ActionBar top & bottom.

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 can I correctly organise the blue icons so 72x72 is used for the launcher and 48x48 is used for the ActionBar?

Programmer Bruce
  • 64,977
  • 7
  • 99
  • 97
Al.
  • 2,285
  • 2
  • 22
  • 30

1 Answers1

11

Honeycomb's launcher will use available hdpi drawables as higher-res mipmaps on mdpi devices. mdpi icons should still be 48x48. If you want to provide resources specific to xlarge screens you should provide versions in drawable-xlarge-mdpi, drawable-xlarge-hdpi, etc.

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

API level version qualifiers in your resource organization can be useful in other circumstances where system styling changed too, such as the notification icon style changes in 2.3.

adamp
  • 28,862
  • 9
  • 81
  • 69
  • Thanks, that sorted it. For the benefit of everyone else: HC launcher icon in drawable-hdpi-v11, HC ActionBar icon drawable-mdpi-v11, all other images in drawable-v11 – Al. Feb 27 '11 at 19:09
  • You shouldn't really put it in hdpi though as the Xoom (and probably all tablets during 2011 at least) will have mdpi screens. – alexanderblom Feb 28 '11 at 23:32
  • 2
    As I mentioned, hdpi icon resources are used as higher-resolution mipmaps by the honeycomb launcher, even on mdpi devices. – adamp Mar 01 '11 at 01:49