Tab


@CarProtocol
@RequiresCarApi(value = 6)
public final class Tab implements Content


Represents a tab with a title and an image. Tab instances are used by TabTemplate to display tab headers.

Summary

Nested types

public final class Tab.Builder

A builder of Tab.

Public methods

boolean
@NonNull String

Returns the content ID associated with the tab.

@NonNull CarIcon

Returns the image to display in the tab.

@Nullable TabStyle

Returns the TabStyle of the container or null if not set.

@NonNull CarText

Returns the title of the tab.

int
@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getContentId

public @NonNull String getContentId()

Returns the content ID associated with the tab.

See also
setContentId

getIcon

Added in 1.3.0
public @NonNull CarIcon getIcon()

Returns the image to display in the tab.

See also
setIcon

getStyle

Added in 1.9.0-alpha02
@ExperimentalCarApi
@RequiresCarApi(value = 9)
public @Nullable TabStyle getStyle()

Returns the TabStyle of the container or null if not set.

See also
setStyle

getTitle

Added in 1.3.0
public @NonNull CarText getTitle()

Returns the title of the tab.

See also
setTitle

hashCode

public int hashCode()

toString

public @NonNull String toString()