summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppsCustomizePagedView.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-10-31 16:53:19 -0700
committerDanesh M <daneshm90@gmail.com>2014-06-05 23:45:26 -0700
commitd7a8072b47bca420866ecd93e3ff4234e20d7065 (patch)
tree3dd178dca484e26facd1abc9fa34b574f6d04f19 /src/com/android/launcher3/AppsCustomizePagedView.java
parent0581e23f0f5b50e4bf4834b7439c8614e0c53f5a (diff)
downloadandroid_packages_apps_Trebuchet-d7a8072b47bca420866ecd93e3ff4234e20d7065.tar.gz
android_packages_apps_Trebuchet-d7a8072b47bca420866ecd93e3ff4234e20d7065.tar.bz2
android_packages_apps_Trebuchet-d7a8072b47bca420866ecd93e3ff4234e20d7065.zip
Initial changes to support AllApps on various form factors.
Change-Id: I7bacb36f8a70c8ac920426899193a7bb7b7abbcb
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 253ee2e29..6d8ad0f1e 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -216,6 +216,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
private PagedViewCellLayout mWidgetSpacingLayout;
private int mNumAppsPages;
private int mNumWidgetPages;
+ private Rect mAllAppsPadding = new Rect();
// Animation states
enum State { NORMAL, OVERVIEW};
@@ -361,6 +362,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() {
@@ -1083,6 +1091,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);
}