public interface PageIndicator
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
EDIT_MODE_COUNT
Tabs / dots / whatever to show in edit mode.
|
static int |
EDIT_MODE_PAGE
Selected page in edit mode.
|
static java.lang.String |
EDIT_MODE_TITLE
Tab title in edit mode;
|
static java.lang.CharSequence |
EMPTY_TITLE
Title text used when no title is provided by the adapter.
|
static int |
INVALID_POINTER
Not really part of a PageIndicator, but used everywhere.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
notifyDataSetChanged()
Notify the indicator that the fragment list has changed.
|
void |
setCurrentItem(int item)
Set the current page of both the ViewPager and indicator.
|
void |
setOnPageChangeListener(ViewPager.OnPageChangeListener listener)
Set a page change listener which will receive forwarded events.
|
void |
setViewPager(ViewPager view)
Bind the indicator to a ViewPager.
|
void |
setViewPager(ViewPager view,
int initialPosition)
Bind the indicator to a ViewPager.
|
static final int EDIT_MODE_COUNT
static final int EDIT_MODE_PAGE
static final java.lang.String EDIT_MODE_TITLE
static final java.lang.CharSequence EMPTY_TITLE
static final int INVALID_POINTER
void setViewPager(ViewPager view)
view - void setViewPager(ViewPager view,
int initialPosition)
view - initialPosition - void setCurrentItem(int item)
Set the current page of both the ViewPager and indicator.
This must be used if you need to set the page before the views are drawn on screen (e.g., default start page).
item - void setOnPageChangeListener(ViewPager.OnPageChangeListener listener)
listener - void notifyDataSetChanged()