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)
Applies a corner effect to the border
|
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 |
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 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 intervalspublic Border.Builder cornerEffect(float radius)
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))
radius
- 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()