diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-01-08 14:19:34 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-01-10 15:13:25 -0800 |
commit | 07b6929cd94e6d55fb660f85baf1df840de48f46 (patch) | |
tree | 1a36a8f59b943d5440d72efa12d5ce2a2a027188 /src/com/android/launcher3/InsettableFrameLayout.java | |
parent | 228153d92ae68c82efd3fcad4ad3df6af7fc24a2 (diff) | |
download | android_packages_apps_Trebuchet-07b6929cd94e6d55fb660f85baf1df840de48f46.tar.gz android_packages_apps_Trebuchet-07b6929cd94e6d55fb660f85baf1df840de48f46.tar.bz2 android_packages_apps_Trebuchet-07b6929cd94e6d55fb660f85baf1df840de48f46.zip |
Removing layout handling in DeviceProfile and moving it to
individual views
Bug: 71709920
Change-Id: I8300fa7a84b31898bdb135d774cca576d2928525
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 60f5ca292..baf3328ea 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); + } + } + } } |