Lines Matching refs:padding

73      * Padding mode used to nest each layer inside the padding of the previous
456 * @param left The left padding of the new layer.
457 * @param top The top padding of the new layer.
458 * @param right The right padding of the new layer.
459 * @param bottom The bottom padding of the new layer.
722 * {@link #setLayerInset(int, int, int, int, int)}) or padding (see
926 * Specifies how layer padding should affect the bounds of subsequent
929 * @param mode padding mode, one of:
932 * padding of the previous layer
947 * @return the current padding mode
1022 public boolean getPadding(Rect padding) {
1025 computeNestedPadding(padding);
1027 computeStackedPadding(padding);
1033 // Resolve padding for RTL. Relative padding overrides absolute
1034 // padding.
1041 // If padding was explicitly specified (e.g. not -1) then override the
1042 // computed padding in that dimension.
1044 padding.left = paddingL;
1048 padding.top = paddingT;
1052 padding.right = paddingR;
1056 padding.bottom = paddingB;
1059 return padding.left != 0 || padding.top != 0 || padding.right != 0 || padding.bottom != 0;
1063 * Sets the absolute padding.
1065 * If padding in a dimension is specified as {@code -1}, the resolved
1066 * padding will use the value computed according to the padding mode (see
1069 * Calling this method clears any relative padding values previously set
1072 * @param left the left padding in pixels, or -1 to use computed padding
1073 * @param top the top padding in pixels, or -1 to use computed padding
1074 * @param right the right padding in pixels, or -1 to use computed padding
1075 * @param bottom the bottom padding in pixels, or -1 to use computed
1076 * padding
1090 // Clear relative padding values.
1096 * Sets the relative padding.
1098 * If padding in a dimension is specified as {@code -1}, the resolved
1099 * padding will use the value computed according to the padding mode (see
1102 * Calling this method clears any absolute padding values previously set
1105 * @param start the start padding in pixels, or -1 to use computed padding
1106 * @param top the top padding in pixels, or -1 to use computed padding
1107 * @param end the end padding in pixels, or -1 to use computed padding
1108 * @param bottom the bottom padding in pixels, or -1 to use computed
1109 * padding
1123 // Clear absolute padding values.
1129 * Returns the left padding in pixels.
1131 * A return value of {@code -1} means there is no explicit padding set for
1134 * according to the padding mode (see {@link #getPaddingMode()}.
1136 * @return the left padding in pixels, or -1 if not explicitly specified
1145 * Returns the right padding in pixels.
1147 * A return value of {@code -1} means there is no explicit padding set for
1150 * according to the padding mode (see {@link #getPaddingMode()}.
1152 * @return the right padding in pixels, or -1 if not explicitly specified
1161 * Returns the start padding in pixels.
1163 * A return value of {@code -1} means there is no explicit padding set for
1166 * according to the padding mode (see {@link #getPaddingMode()}.
1168 * @return the start padding in pixels, or -1 if not explicitly specified
1177 * Returns the end padding in pixels.
1179 * A return value of {@code -1} means there is no explicit padding set for
1182 * according to the padding mode (see {@link #getPaddingMode()}.
1184 * @return the end padding in pixels, or -1 if not explicitly specified
1193 * Returns the top padding in pixels.
1195 * A return value of {@code -1} means there is no explicit padding set for
1198 * according to the padding mode (see {@link #getPaddingMode()}.
1200 * @return the top padding in pixels, or -1 if not explicitly specified
1210 * Returns the bottom padding in pixels.
1212 * A return value of {@code -1} means there is no explicit padding set for
1215 * according to the padding mode (see {@link #getPaddingMode()}.
1217 * @return the bottom padding in pixels, or -1 if not explicitly specified
1226 private void computeNestedPadding(Rect padding) {
1227 padding.left = 0;
1228 padding.top = 0;
1229 padding.right = 0;
1230 padding.bottom = 0;
1232 // Add all the padding.
1238 padding.left += mPaddingL[i];
1239 padding.top += mPaddingT[i];
1240 padding.right += mPaddingR[i];
1241 padding.bottom += mPaddingB[i];
1245 private void computeStackedPadding(Rect padding) {
1246 padding.left = 0;
1247 padding.top = 0;
1248 padding.right = 0;
1249 padding.bottom = 0;
1251 // Take the max padding.
1257 padding.left = Math.max(padding.left, mPaddingL[i]);
1258 padding.top = Math.max(padding.top, mPaddingT[i]);
1259 padding.right = Math.max(padding.right, mPaddingR[i]);
1260 padding.bottom = Math.max(padding.bottom, mPaddingB[i]);
1570 // Establish containing region based on aggregate padding and
1660 // padding are defined, they will be resolved (hence overriding) to
1662 // direction. If start / end padding are not defined, use the
1669 // Don't apply padding and insets for children that don't have
1701 // Don't apply padding and insets for children that don't have
1719 * Refreshes the cached padding values for the specified child.
1721 * @return true if the child's padding has changed
1740 * Ensures the child padding caches are large enough.