TitleChip.Builder

Added in 1.1.0
Deprecated in 1.2.0

class TitleChip.Builder : LayoutElementBuilders.LayoutElement.Builder


Builder class for TitleChip.

Summary

Public constructors

Builder(
    context: Context,
    text: String,
    clickable: ModifiersBuilders.Clickable,
    deviceParameters: DeviceParametersBuilders.DeviceParameters
)

This function is deprecated. Deprecated in Java

Public functions

TitleChip

This function is deprecated. Deprecated in Java

TitleChip.Builder

This function is deprecated. Deprecated in Java

TitleChip.Builder
setHorizontalAlignment(horizontalAlignment: Int)

This function is deprecated. Deprecated in Java

TitleChip.Builder

This function is deprecated. Deprecated in Java

TitleChip.Builder
setWidth(width: @Dimension(unit = 0) Float)

This function is deprecated. Deprecated in Java

Public constructors

Builder

Added in 1.1.0
Deprecated in 1.2.0
Builder(
    context: Context,
    text: String,
    clickable: ModifiersBuilders.Clickable,
    deviceParameters: DeviceParametersBuilders.DeviceParameters
)

Creates a builder for the TitleChip with associated action and the given text

Parameters
context: Context

The application's context.

text: String

The text to be displayed in this title chip. Text will be displayed in 1 line and truncated if it doesn't fit.

clickable: ModifiersBuilders.Clickable

Associated Clickable for click events. When the TitleChip is clicked it will fire the associated action.

deviceParameters: DeviceParametersBuilders.DeviceParameters

The device parameters used for styling text.

Public functions

build

Added in 1.1.0
Deprecated in 1.2.0
fun build(): TitleChip

Constructs and returns TitleChip with the provided content and look.

setChipColors

Added in 1.1.0
Deprecated in 1.2.0
fun setChipColors(chipColors: ChipColors): TitleChip.Builder

Sets the colors for the TitleChip. If set, getBackgroundColor will be used for the background of the button and getContentColor for the text. If not set, TITLE_PRIMARY_COLORS will be used.

setHorizontalAlignment

Added in 1.1.0
Deprecated in 1.2.0
fun setHorizontalAlignment(horizontalAlignment: Int): TitleChip.Builder

Sets the horizontal alignment in the chip. If not set, content will be centered.

setWidth

Added in 1.1.0
Deprecated in 1.2.0
fun setWidth(width: DimensionBuilders.ContainerDimension): TitleChip.Builder

Sets the width of TitleChip. If not set, default value will be set to fill the screen.

setWidth

Added in 1.1.0
Deprecated in 1.2.0
fun setWidth(width: @Dimension(unit = 0) Float): TitleChip.Builder

Sets the width of TitleChip. If not set, default value will be set to fill the screen.