From 205cd7727f3bd8b65892c580e6f243464878fe6e Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 15 Jan 2014 14:31:59 -0800 Subject: Updating Tablet clings. (Bug 11973614) Change-Id: I6cb10424a345691d50c4fac7969e0b97bbee4b3c --- src/com/android/launcher3/DeviceProfile.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/com/android/launcher3/DeviceProfile.java') 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 */ -- cgit v1.2.3