diff options
author | Nebojsa Cvetkovic <nebkat@gmail.com> | 2013-11-26 13:30:30 +0000 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-01-24 16:24:23 -0800 |
commit | 6fafbed8dffad4a85fd1f74d9376f1c9d1829138 (patch) | |
tree | ca98beee8627bcceefb0a046feb31df686450f43 /src/com/android/launcher3/Workspace.java | |
parent | d14c5a17b22825ead2f56797efb5e52096375f9e (diff) | |
download | android_packages_apps_Trebuchet-6fafbed8dffad4a85fd1f74d9376f1c9d1829138.tar.gz android_packages_apps_Trebuchet-6fafbed8dffad4a85fd1f74d9376f1c9d1829138.tar.bz2 android_packages_apps_Trebuchet-6fafbed8dffad4a85fd1f74d9376f1c9d1829138.zip |
Workspace: Show page outlines
Change-Id: I5c62982e052423f16d2983888a30519e388568c4
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 5163d7de6..531eb27e6 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -277,6 +277,7 @@ public class Workspace extends SmoothPagedView }; private boolean mShowSearchBar; + private boolean mShowOutlines; /** * Used to inflate the Workspace from XML. @@ -307,6 +308,9 @@ public class Workspace extends SmoothPagedView mShowSearchBar = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH, R.bool.preferences_interface_homescreen_search_default); + mShowOutlines = SettingsProvider.getBoolean(context, + SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_SHOW_OUTLINES, + R.bool.preferences_interface_homescreen_scrolling_show_outlines_default); mLauncher = (Launcher) context; final Resources res = getResources(); @@ -1054,10 +1058,7 @@ public class Workspace extends SmoothPagedView } } - // Only show page outlines as we pan if we are on large screen - if (LauncherAppState.getInstance().isScreenLarge()) { - showOutlines(); - } + if (mShowOutlines) showOutlines(); // If we are not fading in adjacent screens, we still need to restore the alpha in case the // user scrolls while we are transitioning (should not affect dispatchDraw optimizations) @@ -1084,10 +1085,8 @@ public class Workspace extends SmoothPagedView mDragController.forceTouchMove(); } } else { - // If we are not mid-dragging, hide the page outlines if we are on a large screen - if (LauncherAppState.getInstance().isScreenLarge()) { - hideOutlines(); - } + // If we are not mid-dragging, hide the page outlines + if (mShowOutlines) hideOutlines(); } if (mDelayedResizeRunnable != null) { @@ -1319,7 +1318,7 @@ public class Workspace extends SmoothPagedView } void showOutlines() { - if (!isSmall() && !mIsSwitchingState) { + if (!mIsSwitchingState) { if (mChildrenOutlineFadeOutAnimation != null) mChildrenOutlineFadeOutAnimation.cancel(); if (mChildrenOutlineFadeInAnimation != null) mChildrenOutlineFadeInAnimation.cancel(); mChildrenOutlineFadeInAnimation = LauncherAnimUtils.ofFloat(this, "childrenOutlineAlpha", 1.0f); @@ -1329,7 +1328,7 @@ public class Workspace extends SmoothPagedView } void hideOutlines() { - if (!isSmall() && !mIsSwitchingState) { + if (!mIsSwitchingState) { if (mChildrenOutlineFadeInAnimation != null) mChildrenOutlineFadeInAnimation.cancel(); if (mChildrenOutlineFadeOutAnimation != null) mChildrenOutlineFadeOutAnimation.cancel(); mChildrenOutlineFadeOutAnimation = LauncherAnimUtils.ofFloat(this, "childrenOutlineAlpha", 0.0f); |