mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Initial changes to support AllApps on various form factors.
Change-Id: I7bacb36f8a70c8ac920426899193a7bb7b7abbcb
This commit is contained in:
@@ -187,6 +187,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
private PagedViewCellLayout mWidgetSpacingLayout;
|
||||
private int mNumAppsPages;
|
||||
private int mNumWidgetPages;
|
||||
private Rect mAllAppsPadding = new Rect();
|
||||
|
||||
// Relating to the scroll and overscroll effects
|
||||
Workspace.ZInterpolator mZInterpolator = new Workspace.ZInterpolator(0.5f);
|
||||
@@ -293,6 +294,13 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
grid.edgeMarginPx, 2 * grid.edgeMarginPx);
|
||||
}
|
||||
|
||||
void setAllAppsPadding(Rect r) {
|
||||
mAllAppsPadding.set(r);
|
||||
}
|
||||
void setWidgetsPageIndicatorPadding(int pageIndicatorHeight) {
|
||||
mPageLayoutPaddingBottom = pageIndicatorHeight;
|
||||
}
|
||||
|
||||
/** Returns the item index of the center item on this page so that we can restore to this
|
||||
* item index when we rotate. */
|
||||
private int getMiddleComponentIndexOnCurrentPage() {
|
||||
@@ -995,6 +1003,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
int heightSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.AT_MOST);
|
||||
layout.setMinimumWidth(getPageContentWidth());
|
||||
layout.measure(widthSpec, heightSpec);
|
||||
layout.setPadding(mAllAppsPadding.left, mAllAppsPadding.top, mAllAppsPadding.right,
|
||||
mAllAppsPadding.bottom);
|
||||
setVisibilityOnChildren(layout, View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user