0

I have notification with image. Now I want to update notification and rotate this image, but my method doesn't work:

RemoteViews notificationLayoutExpanded = new RemoteViews(packageName, R.layout.notification_expanded);

// ...

notificationLayoutExpanded.setInt(R.id.notification_arrow, "setRotation", 90);

It's throws:

android.widget.RemoteViews$ActionException: view: android.widget.ImageView doesn't have method: setRotation(int)

Any idea?

Jacek
  • 63
  • 8
  • You can rotate the image and post the notification again with the rotated image.. Use same notification id to update the notification. – HedeH Mar 29 '18 at 12:37
  • But how can I edit RemoteViews? – Jacek Mar 30 '18 at 05:58
  • You don't update them directly, you need to update the notification itself.. Refer to this question if it helps: https://stackoverflow.com/questions/22789588/how-to-update-notification-with-remoteviews – HedeH Apr 01 '18 at 09:11

0 Answers0