setSelectedTabIndicator

open fun setSelectedTabIndicator(@Nullable tabSelectedIndicator: Drawable)

Sets the selection indicator for this TabLayout. By default, this is a line along the bottom of the tab. If tabIndicatorColor is specified via the TabLayout's style or via setSelectedTabIndicatorColor the selection indicator will be tinted that color. Otherwise, it will use the colors specified in the drawable.

Setting the indicator drawable to null will cause TabLayout to use the default, GradientDrawable line indicator.

Parameters

tabSelectedIndicator

A drawable to use as the selected tab indicator.

See also


open fun setSelectedTabIndicator(@DrawableRes tabSelectedIndicatorResourceId: Int)

Sets the drawable resource to use as the selection indicator for this TabLayout. By default, this is a line along the bottom of the tab. If tabIndicatorColor is specified via the TabLayout's style or via setSelectedTabIndicatorColor the selection indicator will be tinted that color. Otherwise, it will use the colors specified in the drawable.

Parameters

tabSelectedIndicatorResourceId

A drawable resource to use as the selected tab indicator.

See also