public class DockedDividerUtils extends Object
Constructor and Description |
---|
DockedDividerUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
calculateBoundsForPosition(int position,
int dockSide,
Rect outRect,
int displayWidth,
int displayHeight,
int dividerSize) |
static int |
calculateMiddlePosition(boolean isHorizontalDivision,
Rect insets,
int displayWidth,
int displayHeight,
int dividerSize) |
static int |
calculatePositionForBounds(Rect bounds,
int dockSide,
int dividerSize) |
static int |
getDockSideFromCreatedMode(boolean dockOnTopOrLeft,
boolean isHorizontalDivision) |
static int |
invertDockSide(int dockSide) |
static void |
sanitizeStackBounds(Rect bounds,
boolean topLeft)
Makes sure that the bounds are always valid, i. e. they are at least one pixel high and wide.
|
public static void calculateBoundsForPosition(int position, int dockSide, Rect outRect, int displayWidth, int displayHeight, int dividerSize)
public static void sanitizeStackBounds(Rect bounds, boolean topLeft)
bounds
- The bounds to sanitize.topLeft
- Pass true if the bounds are at the top/left of the screen, false if they are
at the bottom/right. This is used to determine in which direction to extend
the bounds.public static int calculatePositionForBounds(Rect bounds, int dockSide, int dividerSize)
public static int calculateMiddlePosition(boolean isHorizontalDivision, Rect insets, int displayWidth, int displayHeight, int dividerSize)
public static int getDockSideFromCreatedMode(boolean dockOnTopOrLeft, boolean isHorizontalDivision)
public static int invertDockSide(int dockSide)