diff options
author | Winson Chung <winsonc@google.com> | 2010-09-23 18:40:29 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2010-09-24 11:09:38 -0700 |
commit | 5ffd8eafeb2ef0554ecb38f6e81cf48b674856d9 (patch) | |
tree | e9f75a95a342d5d5e86364a6a7954f96273a7a60 /src/com/android/launcher2/AllAppsPagedView.java | |
parent | dea9e93e4a7b78ae48f27ac0d5d117f6b393bba0 (diff) | |
download | android_packages_apps_Trebuchet-5ffd8eafeb2ef0554ecb38f6e81cf48b674856d9.tar.gz android_packages_apps_Trebuchet-5ffd8eafeb2ef0554ecb38f6e81cf48b674856d9.tar.bz2 android_packages_apps_Trebuchet-5ffd8eafeb2ef0554ecb38f6e81cf48b674856d9.zip |
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
Diffstat (limited to 'src/com/android/launcher2/AllAppsPagedView.java')
-rw-r--r-- | src/com/android/launcher2/AllAppsPagedView.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java index a2a3793dd..04e1cd96b 100644 --- a/src/com/android/launcher2/AllAppsPagedView.java +++ b/src/com/android/launcher2/AllAppsPagedView.java @@ -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); } |