Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android notification small and big images sizes

I'm trying to figure out what is the image size used for the notifications in ICS+
As shown here :
enter image description here

I've tried setting the ic_launcher but it was too big and appear to be cut on the image. (48dp for MDPI) So now i'm using ic_stat_notify which is 24dp for MDPI and it looks pretty small.
I went through all the documentation and I couldn't find any mention of these icons size.

Thank you

like image 591
SagiLow Avatar asked Nov 30 '13 21:11

SagiLow


People also ask

How do I get rid of expand notifications?

To remove a persistent notification on Android as fast as possible, first, press-and-hold on it. Alternatively, swipe the notification left or right to reveal a gear icon on either side, and then tap on it. The notification expands. Tap on “Turn off notifications” at the bottom.


2 Answers

You can find more about these icons dimensions in Iconography part of the documentation here

You can use this website in order to calculate the exact dimensions

like image 108
Aurelian Cotuna Avatar answered Oct 06 '22 20:10

Aurelian Cotuna


If you are implementing your view through a xml layout, you can always scale the ImageView to fit a specific size.

From Android: resizing imageview in XML comes the following example:

<ImageView [...]
  android:maxWidth="42dp"  
  android:maxHeight="42dp"  
  android:scaleType="fitCenter"
  android:adjustViewBounds="true"
  />
like image 35
Mark N Avatar answered Oct 06 '22 19:10

Mark N