开发者

Multiple icon images in Honeycomb

开发者 https://www.devze.com 2023-02-13 12:00 出处:网络
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 开

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 开发者_如何学Pythondrawable-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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号