Tab

open class Tab

A tab in this layout. Instances can be created via newTab.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@set:NonNull
@set:CanIgnoreReturnValue
open var customView: View
Link copied to clipboard
@set:NonNull
@set:CanIgnoreReturnValue
open var icon: Drawable
Link copied to clipboard
@set:NonNull
@set:CanIgnoreReturnValue
open var id: Int
Link copied to clipboard
An invalid position for a tab.
Link copied to clipboard
Link copied to clipboard
open val position: Int
Link copied to clipboard
@set:NonNull
@set:CanIgnoreReturnValue
open var tag: Any
Link copied to clipboard
@set:NonNull
@set:CanIgnoreReturnValue
open var text: CharSequence
Link copied to clipboard

Functions

Link copied to clipboard
Returns an instance of BadgeDrawable associated with this tab, null if none was initialized.
Link copied to clipboard
Gets a brief description of this tab's content for use in accessibility support.
Link copied to clipboard
Creates an instance of BadgeDrawable if none exists.
Link copied to clipboard
Gets the visibility mode for the Labels in this Tab.
Link copied to clipboard
open fun isSelected(): Boolean
Returns true if this tab is currently selected.
Link copied to clipboard
open fun removeBadge()
Removes the BadgeDrawable.
Link copied to clipboard
open fun select()
Select this tab.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@CanIgnoreReturnValue
open fun setContentDescription(@StringRes resId: Int): TabLayout.Tab
@CanIgnoreReturnValue
open fun setContentDescription(@Nullable contentDesc: CharSequence): TabLayout.Tab
Set a description of this tab's content for use in accessibility support.
Link copied to clipboard
@CanIgnoreReturnValue
open fun setCustomView(@LayoutRes resId: Int): TabLayout.Tab
Set a custom view to be used for this tab.
Link copied to clipboard
@CanIgnoreReturnValue
open fun setIcon(@DrawableRes resId: Int): TabLayout.Tab
Set the icon displayed on this tab.
Link copied to clipboard
@CanIgnoreReturnValue
open fun setTabLabelVisibility(mode: Int): TabLayout.Tab
Sets the visibility mode for the Labels in this Tab.
Link copied to clipboard
@CanIgnoreReturnValue
open fun setText(@StringRes resId: Int): TabLayout.Tab
Set the text displayed on this tab.