Known Direct Subclasses
|
Class Overview
A simple implementation of PagerAdapter that automatically saves and restores view states
when returning to pages previously removed and after view pager's state restoration. Similar to
FragmentStatePagerAdapter but for use with just view, rather than fragments.
Summary
[Expand]
Inherited Constants |
From class
androidx.viewpager.widget.PagerAdapter
int |
POSITION_NONE |
|
int |
POSITION_UNCHANGED |
|
|
Protected Methods |
abstract
View
|
createView(ViewGroup container, int position)
Creates the page for the given position to be attached to its container.
|
void
|
destroyView(ViewGroup container, int position, View view)
Removes a page for the given position.
|
[Expand]
Inherited Methods |
From class
androidx.viewpager.widget.PagerAdapter
void
|
destroyItem(View arg0, int arg1, Object arg2)
|
void
|
destroyItem(ViewGroup arg0, int arg1, Object arg2)
|
void
|
finishUpdate(View arg0)
|
void
|
finishUpdate(ViewGroup arg0)
|
abstract
int
|
getCount()
|
int
|
getItemPosition(Object arg0)
|
CharSequence
|
getPageTitle(int arg0)
|
float
|
getPageWidth(int arg0)
|
Object
|
instantiateItem(ViewGroup arg0, int arg1)
|
Object
|
instantiateItem(View arg0, int arg1)
|
abstract
boolean
|
isViewFromObject(View arg0, Object arg1)
|
void
|
notifyDataSetChanged()
|
void
|
registerDataSetObserver(DataSetObserver arg0)
|
void
|
restoreState(Parcelable arg0, ClassLoader arg1)
|
Parcelable
|
saveState()
|
void
|
setPrimaryItem(ViewGroup arg0, int arg1, Object arg2)
|
void
|
setPrimaryItem(View arg0, int arg1, Object arg2)
|
void
|
startUpdate(ViewGroup arg0)
|
void
|
startUpdate(View arg0)
|
void
|
unregisterDataSetObserver(DataSetObserver arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Protected Constructors
protected
ViewStatePagerAdapter
(int capacity)
Public Methods
public
final
void
destroyItem
(ViewGroup container, int position, Object object)
public
final
boolean
isViewFromObject
(View view, Object object)
public
final
ViewStatePagerAdapter.SavedState
saveState
()
Protected Methods
protected
abstract
View
createView
(ViewGroup container, int position)
Creates the page for the given position to be attached to its container.
Parameters
container |
The containing View in which the page will be shown. |
position |
The page position to be instantiated. |
Returns
- Returns a View representing the new page, must not be
null
.
protected
void
destroyView
(ViewGroup container, int position, View view)
Removes a page for the given position.
Parameters
container |
The containing View from which the page will be removed. |
position |
The page position to be removed. |
view |
The page to be removed.
|