Lines Matching defs:bounds
55 * Makes sure that the bounds are always valid, i. e. they are at least one pixel high and wide.
57 * @param bounds The bounds to sanitize.
58 * @param topLeft Pass true if the bounds are at the top/left of the screen, false if they are
60 * the bounds.
62 public static void sanitizeStackBounds(Rect bounds, boolean topLeft) {
64 // If the bounds are either on the top or left of the screen, rather move it further to the
68 if (bounds.left >= bounds.right) {
69 bounds.left = bounds.right - 1;
71 if (bounds.top >= bounds.bottom) {
72 bounds.top = bounds.bottom - 1;
75 if (bounds.right <= bounds.left) {
76 bounds.right = bounds.left + 1;
78 if (bounds.bottom <= bounds.top) {
79 bounds.bottom = bounds.top + 1;
84 public static int calculatePositionForBounds(Rect bounds, int dockSide, int dividerSize) {
87 return bounds.right;
89 return bounds.bottom;
91 return bounds.left - dividerSize;
93 return bounds.top - dividerSize;