public abstract static class TabIndicatorView.TabIndicatorFactory
extends java.lang.Object
| Constructor and Description |
|---|
TabIndicatorView.TabIndicatorFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getCurrentTabIndicator()
Get the current selected tab.
|
abstract android.graphics.drawable.Drawable |
getIcon(int position)
Get the icon for tab indicator at specific position.
|
abstract int |
getTabIndicatorCount()
Get the number of tab indicators.
|
abstract java.lang.CharSequence |
getText(int position)
Get the text for tab indicator at specific position.
|
abstract boolean |
isIconTabIndicator(int position)
Check if the tab indicator at specific position is icon or text.
|
void |
notifyDataSetChanged()
Notify tab's data set has changed, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabChanged(int position)
Notify the tab at specific position has beenchanged, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabInserted(int position)
Notify the tab at specific position has been inserted, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabMoved(int fromPosition,
int toPosition)
Notify the tab at specific position has been moved, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabRangeChanged(int positionStart,
int itemCount)
Notify the range of tab has been changed, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabRangeInserted(int positionStart,
int itemCount)
Notify the range of tab has been inserted, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabRangeRemoved(int positionStart,
int itemCount)
Notify the range of tab has been removed, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabRemoved(int position)
Notify the tab at specific position has been removed, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabScrolled(int position,
float positionOffset)
Notify the current tab is scrolled, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabScrollStateChanged(int state)
Notify the scroll state of your tab layout has changed, and the TabIndicatorView should update to reflect the changes.
|
void |
notifyTabSelected(int position)
Notify a new tab becomes selected, and the TabIndicatorView should update to reflect the changes.
|
abstract void |
onTabIndicatorSelected(int position)
Notify the selected tab indicator has changed.
|
protected void |
setTabIndicatorView(TabIndicatorView view) |
public TabIndicatorView.TabIndicatorFactory()
public abstract int getTabIndicatorCount()
public abstract boolean isIconTabIndicator(int position)
position - The position of tab indicator.public abstract android.graphics.drawable.Drawable getIcon(int position)
position - The position of tab indicator.public abstract java.lang.CharSequence getText(int position)
position - The position of tab indicator.public abstract int getCurrentTabIndicator()
public abstract void onTabIndicatorSelected(int position)
position - The position of selected tab indicator.protected void setTabIndicatorView(TabIndicatorView view)
public final void notifyTabScrollStateChanged(int state)
state - The new scroll state.TabIndicatorView.SCROLL_STATE_IDLE,
TabIndicatorView.SCROLL_STATE_DRAGGING,
TabIndicatorView.SCROLL_STATE_SETTLINGpublic final void notifyTabScrolled(int position,
float positionOffset)
position - Position of the first left tab .positionOffset - Value from [0, 1) indicating the offset from the page at position.public final void notifyTabSelected(int position)
position - Position of the new selected tab.public final void notifyDataSetChanged()
public final void notifyTabChanged(int position)
position - Position of the tab.public final void notifyTabRangeChanged(int positionStart,
int itemCount)
positionStart - The start position of range.itemCount - The number of tabs.public final void notifyTabInserted(int position)
position - Position of the tab.public final void notifyTabMoved(int fromPosition,
int toPosition)
fromPosition - The old position of the tab.toPosition - The new position of the tab.public final void notifyTabRangeInserted(int positionStart,
int itemCount)
positionStart - The start position of range.itemCount - The number of tabs.public final void notifyTabRemoved(int position)
position - Position of the tab.public final void notifyTabRangeRemoved(int positionStart,
int itemCount)
positionStart - The start position of range.itemCount - The number of tabs.