1

I have a drawable-xhdpi-v11 folder containing a 48x48 icon which is used in my Notification:

Notification notification = new Notification(R.drawable.ic_not_logo, null, now);

I noticed on my Galaxy Nexus running JB, the icon is shrunk to 36x36, making it blurry. Why does the documentation ask for a 48x48 if it wants a 36x36? Am I missing something? Is there a way to make my notification icons pixel perfect?

EDIT: Here is a related post Android status bar expects icons of size 25x25dp while guidelines recommend 32x32dp. Who is wrong? The answers in this post do not explain why it still asks for a 48x48 sized icon and down scales it to 36x36.

Community
  • 1
  • 1
timothyjc
  • 2,188
  • 3
  • 29
  • 54

3 Answers3

0

You should provide different version of the very same resource.

Follow the guide: android design status bar

sataniccrow
  • 372
  • 2
  • 7
  • I followed the guidelines and provided different sized icons including the 48x48 icon under the drawable-xhdpi-v11 folder which is the one being used on my Galaxy Nexus xhdpi phone. The actual size of the notificion icon when it is displayed on the screen is 36x36 though, hence my question. – timothyjc Aug 03 '12 at 15:01
  • I got it now, well maybe to avoid getting your icon blurred, you could provide also the 36x36 version created by you. I know this is not a solution, but at least graphically you'll get a nicer image ;) – sataniccrow Aug 20 '12 at 08:27
0

My final conclusion is that it is impossible to have pixel perfect Notification Icons. I experimented with providing different sized icons to the drawable-xhdpi-v11 folder and it down-scales all icons provided regardless of their size, leading to a loss in resolution and blurriness of pixel perfect icons. Pretty disappointing.

timothyjc
  • 2,188
  • 3
  • 29
  • 54
0

You should definitely stick to the 24dp value from the guidelines, but you must provide an xxhdpi res (72px) which can then be used by Android to scale to 36px without blur. Same with app icons, some tablets use the xxhdpi res for the homescreen, even though the device is xhdpi.

mattlaabs
  • 486
  • 3
  • 14