diff options
author | Winson Chung <winsonc@google.com> | 2014-01-16 23:07:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-01-16 23:07:02 +0000 |
commit | f8584042713aad82f9d057ecaace8a9ad1aad0bc (patch) | |
tree | 649f4d436dc980cc9e2db00c017f22eaf640861f /src/com/android/launcher3/DeviceProfile.java | |
parent | 1ba0a30e6545a8c313d0ef355a101f661bbf778c (diff) | |
parent | 205cd7727f3bd8b65892c580e6f243464878fe6e (diff) | |
download | android_packages_apps_Trebuchet-f8584042713aad82f9d057ecaace8a9ad1aad0bc.tar.gz android_packages_apps_Trebuchet-f8584042713aad82f9d057ecaace8a9ad1aad0bc.tar.bz2 android_packages_apps_Trebuchet-f8584042713aad82f9d057ecaace8a9ad1aad0bc.zip |
Merge "Updating Tablet clings. (Bug 11973614)" into jb-ub-now-kermit
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 7ce044676..8bcf6c32e 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -483,9 +483,22 @@ public class DeviceProfile { /** Returns the bounds of the workspace page indicators. */ Rect getWorkspacePageIndicatorBounds(Rect insets) { Rect workspacePadding = getWorkspacePadding(); - int pageIndicatorTop = heightPx - insets.bottom - workspacePadding.bottom; - return new Rect(workspacePadding.left, pageIndicatorTop, - widthPx - workspacePadding.right, pageIndicatorTop + pageIndicatorHeightPx); + if (isLandscape && transposeLayoutWithOrientation) { + if (isLayoutRtl) { + return new Rect(workspacePadding.left, workspacePadding.top, + workspacePadding.left + pageIndicatorHeightPx, + heightPx - workspacePadding.bottom - insets.bottom); + } else { + int pageIndicatorLeft = widthPx - workspacePadding.right; + return new Rect(pageIndicatorLeft, workspacePadding.top, + pageIndicatorLeft + pageIndicatorHeightPx, + heightPx - workspacePadding.bottom - insets.bottom); + } + } else { + int pageIndicatorTop = heightPx - insets.bottom - workspacePadding.bottom; + return new Rect(workspacePadding.left, pageIndicatorTop, + widthPx - workspacePadding.right, pageIndicatorTop + pageIndicatorHeightPx); + } } /** Returns the workspace padding in the specified orientation */ |