{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

TabPosition

public final class TabPosition


Data class that contains information about a tab's position on screen, used for calculating where to place the indicator that shows which tab is selected.

Summary

Public methods

boolean
equals(Object other)
final @NonNull Dp

the content width of this tab.

final @NonNull Dp

the left edge's x position from the start of the TabRow

final @NonNull Dp

the right edge's x position from the start of the TabRow

final @NonNull Dp

the width of this tab

int
@NonNull String

Public methods

equals

public boolean equals(Object other)

getContentWidth

public final @NonNull Dp getContentWidth()

the content width of this tab. Should be a minimum of 24.dp

getLeft

public final @NonNull Dp getLeft()

the left edge's x position from the start of the TabRow

getRight

public final @NonNull Dp getRight()

the right edge's x position from the start of the TabRow

getWidth

public final @NonNull Dp getWidth()

the width of this tab

hashCode

public int hashCode()

toString

public @NonNull String toString()