OSDN Git Service

Fixed a bug where the margins where not updated correctly
authorSelim Cinek <cinek@google.com>
Tue, 1 Dec 2015 21:04:31 +0000 (13:04 -0800)
committerSelim Cinek <cinek@google.com>
Tue, 1 Dec 2015 21:04:31 +0000 (13:04 -0800)
When updating a notification, the end margin was not
correctly updating, leading to overlapping text with
the image.

Change-Id: Ica3d21ff0268105d0a8a73527b8dad0225e12d5a

core/java/android/widget/RemoteViews.java

index 0ed72e4..0dd803a 100644 (file)
@@ -1666,6 +1666,7 @@ public class RemoteViews implements Parcelable, Filter {
             ViewGroup.LayoutParams layoutParams = target.getLayoutParams();
             if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
                 ((ViewGroup.MarginLayoutParams) layoutParams).setMarginEnd(end);
+                target.setLayoutParams(layoutParams);
             }
         }