mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user