From d9dded5008d34d5ad059eaaa6e7796c0c1fbc1c9 Mon Sep 17 00:00:00 2001 From: Jorge Ruesga Date: Sat, 11 May 2013 01:22:51 +0200 Subject: 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: Ib5c123ce4e978500fc30cc039a62c590d75b09f7 Signed-off-by: Jorge Ruesga --- src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java index a38d82606..1b87c4f39 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(); -- cgit v1.2.3