diff options
author | Winson Chung <winsonc@google.com> | 2014-01-15 14:31:59 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2014-01-16 14:26:07 -0800 |
commit | 205cd7727f3bd8b65892c580e6f243464878fe6e (patch) | |
tree | 603e323173787cae0bf5c4d882b73265c00bd904 /src/com/android/launcher3/DeviceProfile.java | |
parent | 230cbf831cbbe8aaa6eaff976f755a8adf5e1708 (diff) | |
download | android_packages_apps_Trebuchet-205cd7727f3bd8b65892c580e6f243464878fe6e.tar.gz android_packages_apps_Trebuchet-205cd7727f3bd8b65892c580e6f243464878fe6e.tar.bz2 android_packages_apps_Trebuchet-205cd7727f3bd8b65892c580e6f243464878fe6e.zip |
Updating Tablet clings. (Bug 11973614)
Change-Id: I6cb10424a345691d50c4fac7969e0b97bbee4b3c
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 */ |