PagerTitleStrip

PagerTitleStrip is a non-interactive indicator of the current, next, and previous pages of a ViewPager. It is intended to be used as a child view of a ViewPager widget in your XML layout. Add it as a child of a ViewPager in your layout file and set its android:layout_gravity to TOP or BOTTOM to pin it to the top or bottom of the ViewPager. The title from each page is supplied by the method getPageTitle in the adapter supplied to the ViewPager.

For an interactive indicator, see PagerTabStrip.

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)

Functions

Link copied to clipboard
open fun getTextSpacing(): Int
Link copied to clipboard
open fun requestLayout()
Link copied to clipboard
open fun setGravity(gravity: Int)
Set the Gravity used to position text within the title strip.
Link copied to clipboard
open fun setNonPrimaryAlpha(@FloatRange(from = 0.0, to = 1.0) alpha: Float)
Set the alpha value used for non-primary page titles.
Link copied to clipboard
open fun setTextColor(@ColorInt color: Int)
Set the color value used as the base color for all displayed page titles.
Link copied to clipboard
open fun setTextSize(unit: Int, size: Float)
Set the default text size to a given unit and value.
Link copied to clipboard
open fun setTextSpacing(spacingPixels: Int)
Set the required spacing between title segments.