diff options
author | Michael Jurka <mikejurka@google.com> | 2011-09-14 15:01:42 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-14 15:01:42 -0700 |
commit | 286f2e1da9f8638b914e0ca1659f36369ee6b501 (patch) | |
tree | c54673c7c319b2d66cd9a0f80f53b1fdf94a2242 | |
parent | cff6af81d721415785bddc2efd74e179d2def9da (diff) | |
parent | b72094fe1da249cc16af517d5ef598b3cbcbdf11 (diff) | |
download | packages_apps_trebuchet-286f2e1da9f8638b914e0ca1659f36369ee6b501.zip packages_apps_trebuchet-286f2e1da9f8638b914e0ca1659f36369ee6b501.tar.gz packages_apps_trebuchet-286f2e1da9f8638b914e0ca1659f36369ee6b501.tar.bz2 |
Merge "Disable tap to switch pages on phones"
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index e57cc6b..156d57e 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -523,7 +523,10 @@ public class Workspace extends SmoothPagedView // mNextPage is set to INVALID_PAGE whenever we are stationary. // Calculating "next page" this way ensures that you scroll to whatever page you tap on final int current = (mNextPage == INVALID_PAGE) ? mCurrentPage : mNextPage; - return hitsPage(current - 1, x, y); + + // Only allow tap to next page on large devices, where there's significant margin outside + // the active workspace + return LauncherApplication.isScreenLarge() && hitsPage(current - 1, x, y); } @Override @@ -531,7 +534,10 @@ public class Workspace extends SmoothPagedView // mNextPage is set to INVALID_PAGE whenever we are stationary. // Calculating "next page" this way ensures that you scroll to whatever page you tap on final int current = (mNextPage == INVALID_PAGE) ? mCurrentPage : mNextPage; - return hitsPage(current + 1, x, y); + + // Only allow tap to next page on large devices, where there's significant margin outside + // the active workspace + return LauncherApplication.isScreenLarge() && hitsPage(current + 1, x, y); } /** |