How to display clear background image on Android Wear notification?

后端 未结 1 1035
面向向阳花
面向向阳花 2020-12-18 03:29

As far as I can work out, there are two ways to set the background image for a notification in Android Wear. For the record, both start with:

   Bitmap bitma         


        
相关标签:
1条回答
  • 2020-12-18 03:59

    Please use setBackground(Bitmap) method from WearableExtender instead of setLargeIcon(Bitmap). It will set the background bitmap that won't be blurred.

    Notification.Builder wearableBuilder = new Notification.Builder(context)
        ...
        .extend(new WearableExtender().setBackground(bitmap));
    
    0 讨论(0)
提交回复
热议问题