summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-07-21 17:44:06 -0700
committerAdam Cohen <adamcohen@google.com>2014-08-10 18:29:36 -0700
commit9bfdb76aaf5c8679b8f2ee3a9a3df2becefb947a (patch)
treef7a8c90e206701c2129eb5c7ed4956c265478329 /src/com/android/launcher3/DeviceProfile.java
parent6075170b838bfe7a040bbff25c2c22859b7d6ee5 (diff)
downloadandroid_packages_apps_Trebuchet-9bfdb76aaf5c8679b8f2ee3a9a3df2becefb947a.tar.gz
android_packages_apps_Trebuchet-9bfdb76aaf5c8679b8f2ee3a9a3df2becefb947a.tar.bz2
android_packages_apps_Trebuchet-9bfdb76aaf5c8679b8f2ee3a9a3df2becefb947a.zip
Polishing the AllApps transition
-> separating HW layers during animation to be siblings instead of parent-child (was destroying parent layer on each frame) -> Unifying material transition with pre-L, everything is the same, just missing the reveal. Change-Id: I8f7d5e658c2d9298bea83ce8199cb35e6fc0d44e
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c0f505481..018fcfcbc 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -775,6 +775,11 @@ public class DeviceProfile {
AppsCustomizePagedView pagedView = (AppsCustomizePagedView)
host.findViewById(R.id.apps_customize_pane_content);
+
+ FrameLayout fakePageContainer = (FrameLayout)
+ host.findViewById(R.id.fake_page_container);
+ FrameLayout fakePage = (FrameLayout) host.findViewById(R.id.fake_page);
+
padding = new Rect();
if (pagedView != null) {
// Constrain the dimensions of all apps so that it does not span the full width
@@ -790,16 +795,24 @@ public class DeviceProfile {
if ((isTablet() || isLandscape) && gridPaddingLR > (allAppsCellWidthPx / 4)) {
padding.left = padding.right = gridPaddingLR;
}
+
// The icons are centered, so we can't just offset by the page indicator height
// because the empty space will actually be pageIndicatorHeight + paddingTB
padding.bottom = Math.max(0, pageIndicatorHeight - paddingTB);
- pagedView.setAllAppsPadding(padding);
+
pagedView.setWidgetsPageIndicatorPadding(pageIndicatorHeight);
+ fakePage.setBackground(res.getDrawable(R.drawable.quantum_panel));
// Horizontal padding for the whole paged view
- int pagedViewPadding =
+ int pagedFixedViewPadding =
res.getDimensionPixelSize(R.dimen.apps_customize_horizontal_padding);
- pagedView.setPadding(pagedViewPadding, 0, pagedViewPadding, 0);
+
+ padding.left += pagedFixedViewPadding;
+ padding.right += pagedFixedViewPadding;
+
+ pagedView.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+ fakePageContainer.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+
}
}