LayoutElementBuilders.DashedLinePattern.Builder


class LayoutElementBuilders.DashedLinePattern.Builder


Builder for DashedLinePattern

Summary

Public constructors

@RequiresSchemaVersion(major = 1, minor = 500)
Builder()

Creates an instance of Builder.

Public functions

LayoutElementBuilders.DashedLinePattern

Builds an instance from accumulated values.

LayoutElementBuilders.DashedLinePattern.Builder
@RequiresSchemaVersion(major = 1, minor = 500)
setGapInterval(gapIntervalInDegrees: Float)

Sets the interval length in degrees between two consecutive gap center locations.

LayoutElementBuilders.DashedLinePattern.Builder
@RequiresSchemaVersion(major = 1, minor = 500)
setGapLocations(gapLocationsInDegrees: FloatArray)

Sets the list of each gap's center location in degrees.

LayoutElementBuilders.DashedLinePattern.Builder
@RequiresSchemaVersion(major = 1, minor = 500)
setGapSize(gapSizeInDp: @Dimension(unit = 0) Float)

Sets the size in dp of the gap between the segments.

Public constructors

Builder

Added in 1.3.0-alpha05
@RequiresSchemaVersion(major = 1, minor = 500)
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.3.0-alpha05
fun build(): LayoutElementBuilders.DashedLinePattern

Builds an instance from accumulated values.

setGapInterval

Added in 1.3.0-alpha05
@RequiresSchemaVersion(major = 1, minor = 500)
fun setGapInterval(gapIntervalInDegrees: Float): LayoutElementBuilders.DashedLinePattern.Builder

Sets the interval length in degrees between two consecutive gap center locations. The arc line will have arc line segments with equal length.

The interval could not be shorter than thickness plus gap size.

Note that calling this method will remove all the gap locations set previously with setGapLocations

setGapLocations

@RequiresSchemaVersion(major = 1, minor = 500)
fun setGapLocations(gapLocationsInDegrees: FloatArray): LayoutElementBuilders.DashedLinePattern.Builder

Sets the list of each gap's center location in degrees.

The interval between any two locations could not be shorter than thickness plus gap size.

Note that calling this method will invalidate the previous call of setGapInterval

setGapSize

Added in 1.3.0-alpha05
@RequiresSchemaVersion(major = 1, minor = 500)
fun setGapSize(gapSizeInDp: @Dimension(unit = 0) Float): LayoutElementBuilders.DashedLinePattern.Builder

Sets the size in dp of the gap between the segments. If not defined, defaults to 0.