summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-01-08 14:04:34 -0800
committerWinson Chung <winsonc@google.com>2014-01-10 22:28:16 +0000
commita694524047fda0a51dede4eefb1201a598d2d3a7 (patch)
treed80c9f4eb0fa253e2dfc297a3a82069cf571dc89 /src/com/android/launcher3/DeviceProfile.java
parentb54a5989a21bef4e6bac304591ca4030bfbe709d (diff)
downloadandroid_packages_apps_Trebuchet-a694524047fda0a51dede4eefb1201a598d2d3a7.tar.gz
android_packages_apps_Trebuchet-a694524047fda0a51dede4eefb1201a598d2d3a7.tar.bz2
android_packages_apps_Trebuchet-a694524047fda0a51dede4eefb1201a598d2d3a7.zip
Adding migration Clings. (Bug 11973614)
- Refactoring Launcher cling code out to LauncherClings. Change-Id: Iff4f84f5b8bfeb69b1be0b4802022c3eb20b6f2c
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 67b0933c9..b6c394cdb 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -475,6 +475,14 @@ public class DeviceProfile {
return bounds;
}
+ /** 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);
+ }
+
/** Returns the workspace padding in the specified orientation */
Rect getWorkspacePadding() {
return getWorkspacePadding(isLandscape ? CellLayout.LANDSCAPE : CellLayout.PORTRAIT);