public class PageAdapter
extends FragmentPagerAdapter
Page elements so that they can be displayed in an ViewPager. Instances of this class automatically listen for
changes to the dataset.| Constructor and Description |
|---|
PageAdapter(FragmentManager fm,
<any> pages)
Constructs a new PageAdapter instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCount() |
Fragment |
getItem(int position) |
<any> |
getPages() |
void |
onItemAdded(ArrayListWithCallbacks list,
java.lang.Object itemAdded,
int index) |
void |
onItemRemoved(ArrayListWithCallbacks list,
java.lang.Object itemRemoved,
int index) |
void |
onListCleared(ArrayListWithCallbacks list) |
public PageAdapter(FragmentManager fm,
<any> pages)
fm - the FragmentManager for the Context this adapter is operating inpages - the dataset of Page elements to adapt, null for an empty datasetpublic <any> getPages()
public Fragment getItem(int position)
public int getCount()
public void onItemAdded(ArrayListWithCallbacks list,
java.lang.Object itemAdded,
int index)
public void onItemRemoved(ArrayListWithCallbacks list,
java.lang.Object itemRemoved,
int index)
public void onListCleared(ArrayListWithCallbacks list)