Initial changes to add Applications tab in the customization drawer for usability testing.
- Also adding padding attributes for the dynamic layouts created for each page. Change-Id: I76a7b6b8f4d83329c506fd6055f910575d0c200f
This commit is contained in:
@@ -68,6 +68,10 @@ public class AllAppsPagedView extends PagedView
|
||||
|
||||
private int mCellCountX;
|
||||
private int mCellCountY;
|
||||
private int mPageLayoutPaddingTop;
|
||||
private int mPageLayoutPaddingBottom;
|
||||
private int mPageLayoutPaddingLeft;
|
||||
private int mPageLayoutPaddingRight;
|
||||
|
||||
private final LayoutInflater mInflater;
|
||||
|
||||
@@ -90,6 +94,14 @@ public class AllAppsPagedView extends PagedView
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PagedView, defStyle, 0);
|
||||
mCellCountX = a.getInt(R.styleable.PagedView_cellCountX, 6);
|
||||
mCellCountY = a.getInt(R.styleable.PagedView_cellCountY, 4);
|
||||
mPageLayoutPaddingTop = a.getDimensionPixelSize(
|
||||
R.styleable.PagedView_pageLayoutPaddingTop, 10);
|
||||
mPageLayoutPaddingBottom = a.getDimensionPixelSize(
|
||||
R.styleable.PagedView_pageLayoutPaddingBottom, 10);
|
||||
mPageLayoutPaddingLeft = a.getDimensionPixelSize(
|
||||
R.styleable.PagedView_pageLayoutPaddingLeft, 10);
|
||||
mPageLayoutPaddingRight = a.getDimensionPixelSize(
|
||||
R.styleable.PagedView_pageLayoutPaddingRight, 10);
|
||||
mInflater = LayoutInflater.from(context);
|
||||
a.recycle();
|
||||
setSoundEffectsEnabled(false);
|
||||
@@ -354,6 +366,8 @@ public class AllAppsPagedView extends PagedView
|
||||
for (int i = curNumPages; i < numPages; ++i) {
|
||||
PagedViewCellLayout layout = new PagedViewCellLayout(getContext());
|
||||
layout.setCellCount(mCellCountX, mCellCountY);
|
||||
layout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop,
|
||||
mPageLayoutPaddingRight, mPageLayoutPaddingBottom);
|
||||
addView(layout);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user