From 55dbb6516d8b3d04ed23cfd613aee24bd525b965 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Tue, 21 Dec 2010 20:15:08 -0800 Subject: [PATCH] Account for background drawable size changing when lrtb properties change LayoutTransition may set the left, right, top, bottom properties of a View when animating it. If the View has a background drawable, and if these properties change the actual dimensions of the view, then the background drawable must be informed of the size change in order to display itself correctly. Change-Id: I8ae47a051b250d0d4bdee97b1f1b5d27fe3f7f8b --- core/java/android/view/View.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 55d3b16973b62..a4ad97b1e8caf 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -5830,6 +5830,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility mPrivateFlags |= DRAWN; // force another invalidation with the new orientation invalidate(); } + mBackgroundSizeChanged = true; } } @@ -5882,6 +5883,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility mPrivateFlags |= DRAWN; // force another invalidation with the new orientation invalidate(); } + mBackgroundSizeChanged = true; } } @@ -5937,7 +5939,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility mPrivateFlags |= DRAWN; // force another invalidation with the new orientation invalidate(); } - + mBackgroundSizeChanged = true; } } @@ -5990,6 +5992,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility mPrivateFlags |= DRAWN; // force another invalidation with the new orientation invalidate(); } + mBackgroundSizeChanged = true; } }