Merge "Defining various modes for CellLayout: Workspace, Hotseat & Folder" into ub-launcher3-master

This commit is contained in:
Sunny Goyal
2016-12-12 20:45:17 +00:00
committed by Android (Google) Code Review
13 changed files with 114 additions and 91 deletions

View File

@@ -30,6 +30,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;
@@ -620,6 +621,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.