java.lang.Object | |||
↳ | androidx.viewpager.widget.PagerAdapter | ||
↳ | com.pspdfkit.ui.ViewStatePagerAdapter | ||
↳ | com.pspdfkit.ui.PdfOutlineView.OutlinePagerAdapter |
A state pager adapter controlling the pager items (outline view and annotation list view) that saves and restores View states.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | getCount() | ||||||||||
int | getItemPosition(Object object) | ||||||||||
int |
getItemTabButtonId(int position)
Returns item tab button id.
| ||||||||||
CharSequence | getPageTitle(int position) | ||||||||||
int |
getPositionOfItemWithTabButtonId(int tabButtonId)
Returns the position of item with given tab button id.
| ||||||||||
boolean | isDocumentInfoListViewAvailable() | ||||||||||
boolean | isOutlineListViewAvailable() | ||||||||||
void |
onHide()
Called when outline list gets hidden.
| ||||||||||
void | onPageScrollStateChanged(int state) | ||||||||||
void | onPageScrolled(int position, float positionOffset, int positionOffsetPixels) | ||||||||||
void | onPageSelected(int position) | ||||||||||
void |
onShow()
Called when outline list gets shown.
| ||||||||||
void |
refreshItemsVisibility()
Refresh items visibility in the adapter.
| ||||||||||
void |
setDocument(PdfDocument document, PdfConfiguration configuration, OutlinePagerBaseView.OnHideListener onHideListener)
Sets the document to the adapter.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Returns item tab button id.
position | Position of the desired tab button. |
---|
Returns the position of item with given tab button id.
tabButtonId | Tab button id we're looking for. |
---|
Called when outline list gets hidden.
Called when outline list gets shown.
Refresh items visibility in the adapter. This has to be called on the main thread.
Sets the document to the adapter. Called on the main thread.
document | Document to be set. |
---|---|
configuration | The configuration |
onHideListener | Outline pager callbacks. |
Creates the page for the given position to be attached to its container.
container | The containing View in which the page will be shown. |
---|---|
position | The page position to be instantiated. |
null
.
Removes a page for the given position.
container | The containing View from which the page will be removed. |
---|---|
position | The page position to be removed. |
view | The page to be removed. |