Dynamically getting the correct pixel size for the large icon
suggest changeIf 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);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents