Honeycomb notifications - How to set largeIcon to the right size?

后端 未结 2 658
醉梦人生
醉梦人生 2020-12-04 19:16

I find myself curious why the setLargeIcon method on Notification.Builder only accepts a Bitmap, with no overload to provide a resource id. Perhaps it was done for performan

2条回答
  •  情歌与酒
    2020-12-04 20:05

    Not had a chance to check it yet but API 11 introduced the following public dimens:

    • notification_large_icon_height
    • notification_large_icon_width

    Should be able to use those to scale your image before setting it on the notification.

提交回复
热议问题