Modifier and Type | Method and Description |
---|---|
Border |
build() |
Border.Builder |
color(YogaEdge edge,
int color)
Specifies a color for a specific edge
|
Border.Builder |
colorRes(YogaEdge edge,
int colorRes)
Specifies a color for a specific edge
|
Border.Builder |
cornerEffect(float radius)
Deprecated.
Please use
radiusPx(int) instead |
Border.Builder |
dashEffect(float[] intervals,
float phase)
Applies a dash effect to the border
|
Border.Builder |
discreteEffect(float segmentLength,
float deviation)
Applies a discrete effect to the border
|
Border.Builder |
pathDashEffect(Path shape,
float advance,
float phase,
PathDashPathEffect.Style style)
Applies a path dash effect to the border
|
Border.Builder |
radiusAttr(int attrId)
Specifies the border radius in both X and Y dimensions
|
Border.Builder |
radiusAttr(int attrId,
int defaultResId)
Specifies the border radius in both X and Y dimensions
|
Border.Builder |
radiusDip(float radius)
Specifies the border radius in both X and Y dimensions
|
Border.Builder |
radiusPx(int radius)
Specifies the border radius in both X and Y dimensions
|
Border.Builder |
radiusRes(int radiusRes)
Specifies the border radius in both X and Y dimensions
|
Border.Builder |
radiusXAttr(int attrId)
Specifies the border radius in the X dimension
|
Border.Builder |
radiusXAttr(int attrId,
int defaultResId)
Specifies the border radius in the X dimension
|
Border.Builder |
radiusXDip(float radius)
Specifies the border radius in the X dimension
|
Border.Builder |
radiusXPx(int radius)
Specifies the border radius in the X dimension
|
Border.Builder |
radiusXRes(int radiusRes)
Specifies the border radius in the X dimension
|
Border.Builder |
radiusYAttr(int attrId)
Specifies the border radius in the Y dimension
|
Border.Builder |
radiusYAttr(int attrId,
int defaultResId)
Specifies the border radius in the Y dimension
|
Border.Builder |
radiusYDip(float radius)
Specifies the border radius in the Y dimension
|
Border.Builder |
radiusYPx(int radius)
Specifies the border radius in the Y dimension
|
Border.Builder |
radiusYRes(int radiusRes)
Specifies the border radius in the Y dimension
|
Border.Builder |
widthAttr(YogaEdge edge,
int attrId)
Specifies a width for a specific edge
|
Border.Builder |
widthAttr(YogaEdge edge,
int attrId,
int defaultResId)
Specifies a width for a specific edge
|
Border.Builder |
widthDip(YogaEdge edge,
int width)
Specifies a width for a specific edge
|
Border.Builder |
widthPx(YogaEdge edge,
int width)
Specifies a width for a specific edge
|
Border.Builder |
widthRes(YogaEdge edge,
int widthRes)
Specifies a width for a specific edge
|
public Border.Builder widthPx(YogaEdge edge, @Px int width)
Note: Having a border effect with varying widths per edge is currently not supported
edge
- The YogaEdge
that will have its width modifiedwidth
- The desired width in raw pixelspublic Border.Builder widthDip(YogaEdge edge, @Dimension(unit=0) int width)
Note: Having a border effect with varying widths per edge is currently not supported
edge
- The YogaEdge
that will have its width modifiedwidth
- The desired width in density independent pixelspublic Border.Builder widthRes(YogaEdge edge, @DimenRes int widthRes)
Note: Having a border effect with varying widths per edge is currently not supported
edge
- The YogaEdge
that will have its width modifiedwidthRes
- The desired width resource to resolvepublic Border.Builder widthAttr(YogaEdge edge, @AttrRes int attrId)
Note: Having a border effect with varying widths per edge is currently not supported
edge
- The YogaEdge
that will have its width modifiedattrId
- The attribute to resolve a width value frompublic Border.Builder widthAttr(YogaEdge edge, @AttrRes int attrId, @DimenRes int defaultResId)
Note: Having a border effect with varying widths per edge is currently not supported
edge
- The YogaEdge
that will have its width modifiedattrId
- The attribute to resolve a width value fromdefaultResId
- Default resource value to utilize if the attribute is not setpublic Border.Builder radiusPx(@Px int radius)
radius
- The desired border radius in both X and Y dimensionspublic Border.Builder radiusDip(@Dimension(unit=0) float radius)
radius
- The desired border radius in both X and Y dimensionspublic Border.Builder radiusRes(@DimenRes int radiusRes)
radiusRes
- The resource id to retrieve the border radius value frompublic Border.Builder radiusAttr(@AttrRes int attrId)
attrId
- The attribute id to retrieve the border radius value frompublic Border.Builder radiusAttr(@AttrRes int attrId, @DimenRes int defaultResId)
attrId
- The attribute id to retrieve the border radius value fromdefaultResId
- Default resource to utilize if the attribute is not setpublic Border.Builder radiusXPx(@Px int radius)
radius
- The desired border radius in the X dimensionpublic Border.Builder radiusXDip(@Dimension(unit=0) float radius)
radius
- The desired border radius in the X dimensionpublic Border.Builder radiusXRes(@DimenRes int radiusRes)
radiusRes
- The resource id to retrieve the border radius value frompublic Border.Builder radiusXAttr(@AttrRes int attrId)
attrId
- The attribute id to retrieve the border radius value frompublic Border.Builder radiusXAttr(@AttrRes int attrId, @DimenRes int defaultResId)
attrId
- The attribute id to retrieve the border radius value fromdefaultResId
- Default resource to utilize if the attribute is not setpublic Border.Builder radiusYPx(@Px int radius)
radius
- The desired border radius in the Y dimensionpublic Border.Builder radiusYDip(@Dimension(unit=0) float radius)
radius
- The desired border radius in the Y dimensionpublic Border.Builder radiusYRes(@DimenRes int radiusRes)
radiusRes
- The resource id to retrieve the border radius value frompublic Border.Builder radiusYAttr(@AttrRes int attrId)
attrId
- The attribute id to retrieve the border radius value frompublic Border.Builder radiusYAttr(@AttrRes int attrId, @DimenRes int defaultResId)
attrId
- The attribute id to retrieve the border radius value fromdefaultResId
- Default resource to utilize if the attribute is not setpublic Border.Builder color(YogaEdge edge, int color)
edge
- The YogaEdge
that will have its color modifiedcolor
- The raw color value to usepublic Border.Builder colorRes(YogaEdge edge, @ColorRes int colorRes)
edge
- The YogaEdge
that will have its color modifiedcolorRes
- The color resource to usepublic Border.Builder dashEffect(float[] intervals, float phase)
Specifying two effects will compose them where the first specified effect acts as the outer effect and the second acts as the inner path effect, e.g. outer(inner(path))
intervals
- Must be even-sized >= 2. Even indices specify "on" intervals and odd indices
specify "off" intervalsphase
- Offset into the given intervals@Deprecated public Border.Builder cornerEffect(float radius)
radiusPx(int)
insteadradius
- The amount to round sharp angles when drawing the borderpublic Border.Builder discreteEffect(float segmentLength, float deviation)
Specifying two effects will compose them where the first specified effect acts as the outer effect and the second acts as the inner path effect, e.g. outer(inner(path))
segmentLength
- Length of line segmentsdeviation
- Maximum amount of deviation. Utilized value is random in the range
[-deviation, deviation]public Border.Builder pathDashEffect(Path shape, float advance, float phase, PathDashPathEffect.Style style)
Specifying two effects will compose them where the first specified effect acts as the outer effect and the second acts as the inner path effect, e.g. outer(inner(path))
shape
- The path to stamp alongadvance
- The spacing between each stampphase
- Amount to offset before the first stampstyle
- How to transform the shape at each positionpublic Border build()