diff options
Diffstat (limited to 'src/com/android/launcher3/InsettableFrameLayout.java')
-rw-r--r-- | src/com/android/launcher3/InsettableFrameLayout.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/InsettableFrameLayout.java b/src/com/android/launcher3/InsettableFrameLayout.java index 60f5ca2925..baf3328eaf 100644 --- a/src/com/android/launcher3/InsettableFrameLayout.java +++ b/src/com/android/launcher3/InsettableFrameLayout.java @@ -97,4 +97,14 @@ public class InsettableFrameLayout extends FrameLayout implements Insettable { super.onViewAdded(child); setFrameLayoutChildInsets(child, mInsets, new Rect()); } + + public static void dispatchInsets(ViewGroup parent, Rect insets) { + final int n = parent.getChildCount(); + for (int i = 0; i < n; i++) { + final View child = parent.getChildAt(i); + if (child instanceof Insettable) { + ((Insettable) child).setInsets(insets); + } + } + } } |