Android Notifications suggest change

Dynamically getting the correct pixel size for the large icon

If you’re creating an image, decoding an image, or resizing an image to fit the large notification image area, you can get the correct pixel dimensions like so:

Resources resources = context.getResources();
int width  = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width);
int height = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_height);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents