BaseGridView
public
abstract
class
BaseGridView
extends RecyclerView
| java.lang.Object | ||||
| ↳ | android.view.View | |||
| ↳ | android.view.ViewGroup | |||
| ↳ | androidx.recyclerview.widget.RecyclerView | |||
| ↳ | androidx.leanback.widget.BaseGridView | |||
|
Known direct subclasses
|
An abstract base class for vertically and horizontally scrolling lists. The items come
from the RecyclerView.Adapter associated with this view.
Do not directly use this class, use VerticalGridView and HorizontalGridView.
The class is not intended to be subclassed other than VerticalGridView and
HorizontalGridView.
Summary
Nested classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
interface |
BaseGridView.OnKeyInterceptListener
Listener for intercepting key dispatch events. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface |
BaseGridView.OnLayoutCompletedListener
Interface for receiving notification when BaseGridView has completed a full layout calculation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface |
BaseGridView.OnMotionInterceptListener
Listener for intercepting generic motion dispatch events. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface |
BaseGridView.OnTouchInterceptListener
Listener for intercepting touch dispatch events. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface |
BaseGridView.OnUnhandledKeyListener
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface |
BaseGridView.SmoothScrollByBehavior
Defines behavior of duration and interpolator for smoothScrollBy(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Constants | |
|---|---|
float |
ITEM_ALIGN_OFFSET_PERCENT_DISABLED
Value indicates that percent is not used. |
int |
SAVE_ALL_CHILD
Save on screen views plus save off screen child views without any limitation. |
int |
SAVE_LIMITED_CHILD
Save on screen views plus save off screen child views states up to
|
int |
SAVE_NO_CHILD
Dont save states of any child views. |
int |
SAVE_ON_SCREEN_CHILD
Only save on screen child views, the states are lost when they become off screen. |
int |
WINDOW_ALIGN_BOTH_EDGE
The first item and last item are aligned with the two edges of the viewport. |
int |
WINDOW_ALIGN_HIGH_EDGE
The last item is aligned with the high edge of the viewport when navigating to the end of list. |
int |
WINDOW_ALIGN_LOW_EDGE
The first item is aligned with the low edge of the viewport. |
int |
WINDOW_ALIGN_NO_EDGE
The focused item always stays in a key line location. |
float |
WINDOW_ALIGN_OFFSET_PERCENT_DISABLED
Value indicates that percent is not used. |
Inherited constants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
androidx.recyclerview.widget.RecyclerView
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
From class
android.view.ViewGroup
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
From class
android.view.View
|
Inherited fields | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
android.view.View
|
Public methods | |
|---|---|
void
|
addOnChildViewHolderSelectedListener(OnChildViewHolderSelectedListener listener)
Registers a callback to be invoked when an item in BaseGridView has been selected. |
final
void
|
addOnLayoutCompletedListener(BaseGridView.OnLayoutCompletedListener listener)
Registers a callback to be invoked when the BaseGridView completes a full layout calculation. |
void
|
animateIn()
Undo animateOut() and slide in child views. |
void
|
animateOut()
Temporarily slide out child views to bottom (for VerticalGridView) or end (for HorizontalGridView). |
boolean
|
dispatchKeyEvent(KeyEvent event)
|
boolean
|
dispatchTouchEvent(MotionEvent event)
|
View
|
focusSearch(int direction)
|
int
|
getChildDrawingOrder(int childCount, int i)
|
int
|
getHorizontalMargin()
This method is deprecated.
Use |
int
|
getHorizontalSpacing()
Returns the horizontal spacing in pixels between two child items. |
int
|
getInitialPrefetchItemCount()
Gets the number of items to prefetch in
|
int
|
getItemAlignmentOffset()
Returns number of pixels to the end of low edge. |
float
|
getItemAlignmentOffsetPercent()
Returns the offset percent for item alignment in addition to |
int
|
getItemAlignmentViewId()
Returns the id of the view to align with, or |
BaseGridView.OnUnhandledKeyListener
|
getOnUnhandledKeyListener()
Returns the unhandled key listener. |
final
int
|
getSaveChildrenLimitNumber()
Returns the limit used when when |
final
int
|
getSaveChildrenPolicy()
Returns the policy for saving children. |
int
|
getSelectedPosition()
Returns the adapter position of selected item. |
BaseGridView.SmoothScrollByBehavior
|
getSmoothScrollByBehavior()
Returns custom behavior for smoothScrollBy(). |
final
int
|
getSmoothScrollMaxPendingMoves()
When holding DPAD, DPAD events are generated faster than the grid view can scroll. |
final
float
|
getSmoothScrollSpeedFactor()
|
int
|
getVerticalMargin()
This method is deprecated.
Use |
int
|
getVerticalSpacing()
Returns the vertical spacing in pixels between two child items. |
void
|
getViewSelectedOffsets(View view, int[] offsets)
Returns the x/y offsets to final position from current position if the view is selected. |
int
|
getWindowAlignment()
Returns the method for focused item alignment in the view. |
int
|
getWindowAlignmentOffset()
Returns the offset in pixels for window alignment key line. |
float
|
getWindowAlignmentOffsetPercent()
Returns the offset percent for window alignment key line in addition to
|
boolean
|
hasOverlappingRendering()
|
boolean
|
hasPreviousViewInSameRow(int position)
Returns true if the view at the given position has a same row sibling in front of it. |
boolean
|
isChildLayoutAnimated()
Returns true if an animation will run when a child changes size or when adding or removing a child. |
boolean
|
isFocusDrawingOrderEnabled()
Returns true if draws selected child at last, false otherwise. |
final
boolean
|
isFocusSearchDisabled()
Returns true if focus search is disabled. |
boolean
|
isItemAlignmentOffsetWithPadding()
Returns true if applies padding to item alignment when
|
boolean
|
isScrollEnabled()
Returns true if scrolling is enabled, false otherwise. |
boolean
|
isWindowAlignmentPreferKeyLineOverHighEdge()
Returns whether prefer key line over high edge when |
boolean
|
isWindowAlignmentPreferKeyLineOverLowEdge()
Returns whether prefer key line over low edge when |
boolean
|
onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect)
|
void
|
onRtlPropertiesChanged(int layoutDirection)
Notify layout manager that layout directionality has been updated |
void
|
removeOnChildViewHolderSelectedListener(OnChildViewHolderSelectedListener listener)
Remove the callback invoked when an item in BaseGridView has been selected. |
final
void
|
removeOnLayoutCompletedListener(BaseGridView.OnLayoutCompletedListener listener)
Removes a callback to be invoked when the BaseGridView completes a full layout calculation. |
void
|
removeView(View view)
|
void
|
removeViewAt(int index)
|
void
|
scrollToPosition(int position)
Convenience method to scroll to a certain position. |
void
|
setAnimateChildLayout(boolean animateChildLayout)
Sets whether ItemAnimator should run when a child changes size or when adding or removing a child. |
void
|
setChildrenVisibility(int visibility)
Changes and overrides children's visibility. |
void
|
setFocusDrawingOrderEnabled(boolean enabled)
Enables or disables the default "focus draw at last" order rule. |
final
void
|
setFocusSearchDisabled(boolean disabled)
Disables or enables focus search. |
void
|
setGravity(int gravity)
Sets the gravity used for child view positioning. |
void
|
setHasOverlappingRendering(boolean hasOverlapping)
|
void
|
setHorizontalMargin(int margin)
This method is deprecated.
Use |
void
|
setHorizontalSpacing(int spacing)
Sets the horizontal spacing in pixels between two child items. |
void
|
setInitialPrefetchItemCount(int itemCount)
Sets the number of items to prefetch in
|
void
|
setItemAlignmentOffset(int offset)
Sets number of pixels to the end of low edge. |
void
|
setItemAlignmentOffsetPercent(float offsetPercent)
Sets the offset percent for item alignment in addition to |
void
|
setItemAlignmentOffsetWithPadding(boolean withPadding)
Sets whether applies padding to item alignment when |
void
|
setItemAlignmentViewId(int viewId)
Sets the id of the view to align with. |
void
|
setItemMargin(int margin)
This method is deprecated.
use |
void
|
setItemSpacing(int spacing)
Sets the vertical and horizontal spacing in pixels between two child items. |
void
|
setLayoutEnabled(boolean layoutEnabled)
Enables or disables layout. |
void
|
setOnChildLaidOutListener(OnChildLaidOutListener listener)
Registers a callback to be invoked when an item in BaseGridView has been laid out. |
void
|
setOnChildSelectedListener(OnChildSelectedListener listener)
Registers a callback to be invoked when an item in BaseGridView has been selected. |
void
|
setOnChildViewHolderSelectedListener(OnChildViewHolderSelectedListener listener)
Registers a callback to be invoked when an item in BaseGridView has been selected. |
void
|
setOnKeyInterceptListener(BaseGridView.OnKeyInterceptListener listener)
Sets the key intercept listener. |
void
|
setOnMotionInterceptListener(BaseGridView.OnMotionInterceptListener listener)
Sets the generic motion intercept listener. |
void
|
setOnTouchInterceptListener(BaseGridView.OnTouchInterceptListener listener)
Sets the touch intercept listener. |
void
|
setOnUnhandledKeyListener(BaseGridView.OnUnhandledKeyListener listener)
Sets the unhandled key listener. |
void
|
setPruneChild(boolean pruneChild)
Enables or disables pruning of children. |
final
void
|
setSaveChildrenLimitNumber(int limitNumber)
Sets the limit number when |
final
void
|
setSaveChildrenPolicy(int savePolicy)
Sets the policy for saving children. |
void
|
setScrollEnabled(boolean scrollEnabled)
Enables or disables scrolling. |
void
|
setSelectedPosition(int position, int scrollExtra)
Changes the selected item immediately without animation, scrollExtra is applied in primary scroll direction. |
void
|
setSelectedPosition(int position)
Changes the selected item immediately without animation. |
void
|
setSelectedPosition(int position, ViewHolderTask task)
Perform a task on ViewHolder at given position after scroll to it. |
void
|
setSelectedPositionSmooth(int position, ViewHolderTask task)
Perform a task on ViewHolder at given position after smooth scrolling to it. |
void
|
setSelectedPositionSmooth(int position)
Changes the selected item and run an animation to scroll to the target position. |
final
void
|
setSmoothScrollByBehavior(BaseGridView.SmoothScrollByBehavior behavior)
Set custom behavior for smoothScrollBy(). |
final
void
|
setSmoothScrollMaxPendingMoves(int maxPendingMoves)
When holding DPAD, DPAD events are generated faster than the grid view can scroll. |
final
void
|
setSmoothScrollSpeedFactor(float smoothScrollSpeedFactor)
Set factor of how slow the smoothScroller should run. |
void
|
setVerticalMargin(int margin)
This method is deprecated.
Use |
void
|
setVerticalSpacing(int spacing)
Sets the vertical spacing in pixels between two child items. |
void
|
setWindowAlignment(int windowAlignment)
Sets the method for focused item alignment in the view. |
void
|
setWindowAlignmentOffset(int offset)
Sets the offset in pixels for window alignment key line. |
void
|
setWindowAlignmentOffsetPercent(float offsetPercent)
Sets the offset percent for window alignment key line in addition to |
void
|
setWindowAlignmentPreferKeyLineOverHighEdge(boolean preferKeyLineOverHighEdge)
Returns whether prefer key line over high edge when |
void
|
setWindowAlignmentPreferKeyLineOverLowEdge(boolean preferKeyLineOverLowEdge)
Sets whether prefer key line over low edge when |
void
|
smoothScrollBy(int dx, int dy, Interpolator interpolator)
Animate a scroll by the given amount of pixels along either axis. |
void
|
smoothScrollBy(int dx, int dy)
Animate a scroll by the given amount of pixels along either axis. |
void
|
smoothScrollToPosition(int position)
Starts a smooth scroll to an adapter position. |
Protected methods | |
|---|---|
boolean
|
dispatchGenericFocusedEvent(MotionEvent event)
|
void
|
onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect)
|
Inherited methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
androidx.recyclerview.widget.RecyclerView
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
From class
android.view.ViewGroup
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
From class
android.view.View
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||