diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-05-11 01:22:51 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-05-11 01:22:51 +0200 |
commit | b9322f7cf0b288a2e1b89ab56d0d65addd8e6b85 (patch) | |
tree | 05325ae511c5c484623b715d35db59641da5dc7a /src | |
parent | 4c465127aac9ea7d8576ed844facae991867cef8 (diff) | |
download | packages_apps_trebuchet-b9322f7cf0b288a2e1b89ab56d0d65addd8e6b85.zip packages_apps_trebuchet-b9322f7cf0b288a2e1b89ab56d0d65addd8e6b85.tar.gz packages_apps_trebuchet-b9322f7cf0b288a2e1b89ab56d0d65addd8e6b85.tar.bz2 |
Trebuchet: Centers horizontally the drawer on vertical orientation
The drawer (AppsCustomizePagedView) disable the use of centers
horizontally && vertical every page. There is no problem with that on
device with fixed grid, and on devices with isLargeScreen on horizontal
orientation aligning the cellpagedview the top looks good. But when
orientation is vertical, the cellpagedview is aligned to the left.
In this case, this change forces the cellpagedview to center horizontally,
which give to the cellpagedview the same good look than horizontal orientation.
[before] https://sharecloud.ruesga.com/public.php?service=files&t=5fee1bd3e68fd28eafcaff13357956db
[after] https://sharecloud.ruesga.com/public.php?service=files&t=0beb9a41d6ad86fef089fb9f643ff51c
Change-Id: I20a996c60dd5d89b004ceee216ce5aea18b0466f
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java index a38d826..1b87c4f 100644 --- a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java +++ b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java @@ -383,7 +383,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // Preferences mJoinWidgetsApps = PreferencesProvider.Interface.Drawer.getJoinWidgetsApps(); - mVertical = PreferencesProvider.Interface.Drawer.getVertical(); mTransitionEffect = PreferencesProvider.Interface.Drawer.Scrolling.getTransitionEffect( resources.getString(R.string.config_drawerDefaultTransitionEffect)); mFadeInAdjacentScreens = PreferencesProvider.Interface.Drawer.Scrolling.getFadeInAdjacentScreens(); @@ -427,7 +426,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen @Override protected void init() { super.init(); - mCenterPages = false; + mVertical = PreferencesProvider.Interface.Drawer.getVertical(); + mCenterPages = LauncherApplication.isScreenLarge() && mVertical; Context context = getContext(); Resources r = context.getResources(); |