GridViewPager
public
class
GridViewPager
extends ViewGroup
| java.lang.Object | |||
| ↳ | android.view.View | ||
| ↳ | android.view.ViewGroup | ||
| ↳ | android.support.wearable.view.GridViewPager | ||
This class is deprecated.
starting with Android Wear 2.0 we no longer encourage bi-directional spacial models
for apps. If you are looking to implement vertical paging pattern, consider using the SnapHelper and a RecyclerView
instead.
Layout manager that allows the user to navigate both vertically and horizontally through pages of
content. You supply an implementation of a GridPagerAdapter to generate pages for the
view to show.
Summary
Nested classes | |
|---|---|
class |
GridViewPager.LayoutParams
This class is deprecated.
starting with Android Wear 2.0 we no longer encourage bi-directional spacial models
for apps. If you are looking to implement vertical paging pattern, consider using the
|
interface |
GridViewPager.OnAdapterChangeListener
This interface is deprecated.
starting with Android Wear 2.0 we no longer encourage bi-directional spacial models
for apps. If you are looking to implement vertical paging pattern, consider using the
|
interface |
GridViewPager.OnPageChangeListener
This interface is deprecated.
starting with Android Wear 2.0 we no longer encourage bi-directional spacial models
for apps. If you are looking to implement vertical paging pattern, consider using the
|
Constants | |
|---|---|
int |
SCROLL_STATE_CONTENT_SETTLING
|
int |
SCROLL_STATE_DRAGGING
Indicates that the pager is currently being dragged by the user. |
int |
SCROLL_STATE_IDLE
Indicates that the pager is in an idle, settled state. |
int |
SCROLL_STATE_SETTLING
Indicates that the pager is in the process of settling to a final position. |
Inherited constants |
|---|
Inherited fields |
|---|
Public constructors | |
|---|---|
GridViewPager(Context context)
|
|
GridViewPager(Context context, AttributeSet attrs)
|
|
GridViewPager(Context context, AttributeSet attrs, int defStyle)
|
|
Public methods | |
|---|---|
void
|
addView(View child, int index, ViewGroup.LayoutParams params)
|
boolean
|
canScrollHorizontally(int direction)
|
boolean
|
canScrollVertically(int direction)
|
void
|
computeScroll()
|
WindowInsets
|
dispatchApplyWindowInsets(WindowInsets insets)
|
boolean
|
dispatchKeyEvent(KeyEvent event)
|
ViewGroup.LayoutParams
|
generateLayoutParams(AttributeSet attrs)
|
GridPagerAdapter
|
getAdapter()
|
Point
|
getCurrentItem()
|
int
|
getOffscreenPageCount()
Returns the number of pages that will be retained on the sides of the current page in the view hierarchy in an idle state. |
int
|
getPageColumnMargin()
Return the margin between columns of pages. |
int
|
getPageRowMargin()
Returns the margin between rows of pages. |
void
|
measureChild(View child, GridViewPager.LayoutParams lp)
Used to measure all page views. |
WindowInsets
|
onApplyWindowInsets(WindowInsets insets)
|
void
|
onAttachedToWindow()
|
boolean
|
onInterceptTouchEvent(MotionEvent ev)
|
void
|
onPageScrolled(int positionX, int positionY, float offsetX, float offsetY, int offsetLeftPx, int offsetTopPx)
This method will be invoked when |