summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java19
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 */