summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InsettableFrameLayout.java
diff options
context:
space:
mode:
authorVineet Patil <vpatil@cyngn.com>2015-11-17 14:23:05 -0800
committerVineet Patil <vpatil@cyngn.com>2015-11-18 13:39:02 -0800
commit35614fdc7d13179ba9cbc80f15eca6d63cf3229d (patch)
treedfde8498c0ea5a2adb1635120c4f98323f5956ce /src/com/android/launcher3/InsettableFrameLayout.java
parent5fcaab43e603ceabd1d71ec355c8a0b59aac8cf0 (diff)
downloadandroid_packages_apps_Trebuchet-35614fdc7d13179ba9cbc80f15eca6d63cf3229d.tar.gz
android_packages_apps_Trebuchet-35614fdc7d13179ba9cbc80f15eca6d63cf3229d.tar.bz2
android_packages_apps_Trebuchet-35614fdc7d13179ba9cbc80f15eca6d63cf3229d.zip
Implementation of folder animation changes as per cm-13.0
Folder animations in parity with cm. Folder Layout Revision Updated the folder layout to reflect design revisions based on community feedback Change-Id: Ica1bb796dfccf779a954cf0903a1ae94a010ea1a Conflicts: res/drawable-hdpi/folder_bg.9.png res/drawable-hdpi/folder_fill_highlight.9.png res/drawable-mdpi/folder_bg.9.png res/drawable-mdpi/folder_fill_highlight.9.png res/drawable-xhdpi/folder_bg.9.png res/drawable-xhdpi/folder_fill_highlight.9.png res/drawable-xxhdpi/folder_bg.9.png res/drawable-xxhdpi/folder_fill_highlight.9.png res/layout-land/launcher.xml res/layout-port/launcher.xml res/layout-sw720dp/launcher.xml res/layout/user_folder.xml res/values/dimens.xml src/com/android/launcher3/Folder.java src/com/android/launcher3/FolderIcon.java src/com/android/launcher3/Launcher.java Folder animation changes as per cm-13.0 Change-Id: I019511a58bd9f6a60a3c9b68c826726881cec83f Implementing folder animations Change-Id: I83f17c996ecc894ce22fd195b9b33caf58e2e822
Diffstat (limited to 'src/com/android/launcher3/InsettableFrameLayout.java')
-rw-r--r--src/com/android/launcher3/InsettableFrameLayout.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/launcher3/InsettableFrameLayout.java b/src/com/android/launcher3/InsettableFrameLayout.java
index 7343bf686..6400a0f89 100644
--- a/src/com/android/launcher3/InsettableFrameLayout.java
+++ b/src/com/android/launcher3/InsettableFrameLayout.java
@@ -24,10 +24,14 @@ public class InsettableFrameLayout extends FrameLayout implements
if (child instanceof Insettable) {
((Insettable) child).setInsets(newInsets);
} else if (!lp.ignoreInsets) {
- lp.topMargin += (newInsets.top - oldInsets.top);
+ if (!lp.ignoreTopInsets) {
+ lp.topMargin += (newInsets.top - oldInsets.top);
+ }
lp.leftMargin += (newInsets.left - oldInsets.left);
lp.rightMargin += (newInsets.right - oldInsets.right);
- lp.bottomMargin += (newInsets.bottom - oldInsets.bottom);
+ if (!lp.ignoreBottomInsets) {
+ lp.bottomMargin += (newInsets.bottom - oldInsets.bottom);
+ }
}
child.setLayoutParams(lp);
}
@@ -65,6 +69,8 @@ public class InsettableFrameLayout extends FrameLayout implements
public static class LayoutParams extends FrameLayout.LayoutParams {
boolean ignoreInsets = false;
+ boolean ignoreTopInsets = false;
+ boolean ignoreBottomInsets = false;
public LayoutParams(Context c, AttributeSet attrs) {
super(c, attrs);
@@ -72,6 +78,10 @@ public class InsettableFrameLayout extends FrameLayout implements
R.styleable.InsettableFrameLayout_Layout);
ignoreInsets = a.getBoolean(
R.styleable.InsettableFrameLayout_Layout_layout_ignoreInsets, false);
+ ignoreTopInsets = a.getBoolean(
+ R.styleable.InsettableFrameLayout_Layout_layout_ignoreTopInsets, false);
+ ignoreBottomInsets = a.getBoolean(
+ R.styleable.InsettableFrameLayout_Layout_layout_ignoreBottomInsets, false);
a.recycle();
}