TabStyle


@RequiresCarApi(value = 9)
@ExperimentalCarApi
@CarProtocol
public final class TabStyle


Defines the visual style of a Tab.

This style can be used to customize the appearance of the visual container around a tab, such as its shape (corner radius), selected background color, and text color.

Custom styles will fall back to host defaults if they are unset, or if they fail host-enforced contrast requirements.

Summary

Nested types

@RequiresCarApi(value = 9)
@ExperimentalCarApi
public final class TabStyle.Builder

A builder for TabStyle.

Public methods

boolean
@Nullable CarColor

Returns the CarColor of the selected tab container background, or null if not set.

@Nullable Shape

Returns the Shape of the container, or null if not set.

@Nullable CarColor

Returns the CarColor of the text within the tab container, or null if not set.

int
@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getSelectedBackgroundColor

Added in 1.9.0-alpha02
public @Nullable CarColor getSelectedBackgroundColor()

Returns the CarColor of the selected tab container background, or null if not set.

getShape

Added in 1.9.0-alpha02
public @Nullable Shape getShape()

Returns the Shape of the container, or null if not set.

getTextColor

Added in 1.9.0-alpha02
public @Nullable CarColor getTextColor()

Returns the CarColor of the text within the tab container, or null if not set.

hashCode

public int hashCode()

toString

public @NonNull String toString()