I am giving notification by a background service. In notification i am displaying an image , image dimensions are 15*15. But when image is showed it automatically streches to big size , so it became blur. I haven't specified the image size in my program. Why this is happening
The Notification Panel is at the top of your mobile device's screen. It is hidden in the screen but can be accessed by swiping your finger from the top of the screen to the bottom.
Usually, the sequence of the icons indicates how new or old the notifications are. The most recent notifications are displayed on the far left. The status bar shows you the current time, the battery status, and the connections / © NextPit.
1 Tap Notification Settings on the notification panel or tap the Settings app. 2 Tap Notifications. 3 Tap App icon badges.
Refer status bar icon guidelines: http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
For hdpi status bar icon image should be 38px height (24x38),
mdpi - 16x25
ldpi - 12x19
Guildlines says 24x24, that is for mdpi.
Applying the conversion dp*density/160
you get these pixels resolutions:
ldpi 18x18
mdpi 24x24
hdpi 36x36
xhdpi 48x48
(The guidelines actually now list these 4 dimensions)
If you're creating an image, or resizing an image to fix the large notification image area, you can get the pixel dimensions like so:
int width = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width);
int height = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
See https://developer.android.com/reference/android/R.dimen.html#notification_large_icon_height
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With