public class

PagerTitleStrip

extends View
java.lang.Object
   ↳ com.neomades.ui.View
     ↳ com.neomades.ui.PagerTitleStrip
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

PagerTitleStrip is a non-interactive indicator of the current, next, and previous pages of a ViewPager.

Non-interactive means that the title of the current page is not highlighted (not underlined, same color as other titles). It is just centered above the pager. For an interactive indicator, see PagerTabStrip.

The title from each page is supplied by the method getPagerTitleAt(int) in the adapter supplied to the ViewPager. To associate a ViewPager with a PagerTitleStrip, use setPagerTitleStrip(PagerTitleStrip).

Cross Platform Considerations

In iOS platform, the PagerTitleStrip behaves like a PagerSlidingTabStrip.

Summary

[Expand]
Inherited XML Attributes
From class com.neomades.ui.View
[Expand]
Inherited Constants
From interface com.neomades.ui.Alignment
From interface com.neomades.ui.StretchMode
Public Constructors
PagerTitleStrip()
Creates a PagerTitleStrip.
Public Methods
void setDividerVisible(boolean visible)
Hides or displays the dividers.
void setPagerTitleAdapter(PagerTitleAdapter titleAdapter)
Sets a PagerTitleAdapter that will supply titles for this PagerTitleStrip as needed.
void setSelectedTitleColor(Color color)
Sets the text color of the selected page label.
void setTitleColor(Color color)
Sets text color of all page labels (except the selected one if a setSelectedTitleColor(Color) is set).
void setTitleFont(Font font)
Sets text Font of all page labels.
void setTitleKeepNativeCase(boolean enabled)
Indicates if the PagerTitleStrip titles will use the default case of the platform: depending on the platform the titles may be force in upper case or lower case.
[Expand]
Inherited Methods
From class com.neomades.ui.View
From class java.lang.Object

Public Constructors

public PagerTitleStrip ()

Creates a PagerTitleStrip.

Public Methods

public void setDividerVisible (boolean visible)

Hides or displays the dividers.

Parameters
visible the dividers visibility

public void setPagerTitleAdapter (PagerTitleAdapter titleAdapter)

Sets a PagerTitleAdapter that will supply titles for this PagerTitleStrip as needed.

Parameters
titleAdapter Adapter to use

public void setSelectedTitleColor (Color color)

Sets the text color of the selected page label.

Parameters
color the text color of the selected page label.

public void setTitleColor (Color color)

Sets text color of all page labels (except the selected one if a setSelectedTitleColor(Color) is set).

Parameters
color text color of all page labels

public void setTitleFont (Font font)

Sets text Font of all page labels.

Parameters
font The font to apply on page labels

public void setTitleKeepNativeCase (boolean enabled)

Indicates if the PagerTitleStrip titles will use the default case of the platform: depending on the platform the titles may be force in upper case or lower case.

Parameters
enabled true to enable to default behavior of the platform (by default the value is true).