From a694524047fda0a51dede4eefb1201a598d2d3a7 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 8 Jan 2014 14:04:34 -0800 Subject: Adding migration Clings. (Bug 11973614) - Refactoring Launcher cling code out to LauncherClings. Change-Id: Iff4f84f5b8bfeb69b1be0b4802022c3eb20b6f2c --- src/com/android/launcher3/DeviceProfile.java | 8 ++++++++ 1 file changed, 8 insertions(+) (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 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); -- cgit v1.2.3