summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-11-18 23:44:48 -0800
committerSunny Goyal <sunnygoyal@google.com>2016-11-21 15:20:16 +0530
commitc13403c612748bfdf06436510600230c4c4b55ec (patch)
treeb6b8266eb906cb7f4a2c920f7924d1801de1b97e /src/com/android/launcher3/DeviceProfile.java
parentaa8a871e337fe42e9339b96833eaf37bf2b64b2f (diff)
downloadandroid_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.tar.gz
android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.tar.bz2
android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.zip
Defining various modes for CellLayout: Workspace, Hotseat & Folder
> Moving the definition of modes to xml > Defining attributes in xml Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 59ec56ab3..b38109ce8 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -29,6 +29,7 @@ import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
+import com.android.launcher3.CellLayout.ContainerType;
import com.android.launcher3.config.FeatureFlags;
import java.util.ArrayList;
@@ -610,6 +611,19 @@ public class DeviceProfile {
: Math.max(widthPx, heightPx);
}
+ public int getCellHeight(@ContainerType int containerType) {
+ switch (containerType) {
+ case CellLayout.WORKSPACE:
+ return cellHeightPx;
+ case CellLayout.FOLDER:
+ return folderCellHeightPx;
+ case CellLayout.HOTSEAT:
+ return hotseatCellHeightPx;
+ default:
+ // ??
+ return 0;
+ }
+ }
/**
* @return the left/right paddings for all containers.