CompactChip.Builder
public final class CompactChip.Builder implements LayoutElementBuilders.LayoutElement.Builder
Builder class for androidx.wear.tiles.material.CompactChip.
Summary
Public constructors |
|---|
Creates a builder for the |
Public methods |
|
|---|---|
@NonNull CompactChip |
Constructs and returns |
@NonNull CompactChip.Builder |
Sets the colors for the |
Public constructors
publicBuilder(
@NonNull Context context,
@NonNull String text,
@NonNull ModifiersBuilders.Clickable clickable,
@NonNull DeviceParametersBuilders.DeviceParameters deviceParameters
)
Creates a builder for the CompactChip with associated action and the given text
| Parameters | |
|---|---|
@NonNull Context context |
The application's context. |
@NonNull String text |
The text to be displayed in this compact chip. |
@NonNull ModifiersBuilders.Clickable clickable |
Associated |
@NonNull DeviceParametersBuilders.DeviceParameters deviceParameters |
The device parameters used for styling text. |
Public methods
public @NonNull CompactChipbuild()
Constructs and returns CompactChip with the provided content and look.
public @NonNull CompactChip.BuildersetChipColors(@NonNull ChipColors chipColors)
Sets the colors for the CompactChip. If set, getBackgroundColor will be used for the background of the button and getContentColor for the text. If not set, COMPACT_PRIMARY_COLORS will be used.