Essential Android Notifications edit forum

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);

Table Of Contents
39 ACRA
42 Notifications
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close