setSelectedTabIndicatorGravity

open fun setSelectedTabIndicatorGravity(indicatorGravity: Int)

Set the indicator gravity used to align the tab selection indicator in the TabLayout. You must set the indicator height via the custom indicator drawable's intrinsic height (preferred), via the tabIndicatorHeight attribute (deprecated), or via setSelectedTabIndicatorHeight (deprecated). Otherwise, the indicator will not be shown unless gravity is set to INDICATOR_GRAVITY_STRETCH, in which case it will ignore indicator height and stretch across the entire height and width of the TabLayout. This defaults to INDICATOR_GRAVITY_BOTTOM if not set.

Parameters