BaseGridView
abstract class BaseGridView : RecyclerView
kotlin.Any | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | androidx.recyclerview.widget.RecyclerView | |||
↳ | androidx.leanback.widget.BaseGridView |
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 | |
---|---|
abstract |
Listener for intercepting key dispatch events. |
abstract |
Interface for receiving notification when BaseGridView has completed a full layout calculation. |
abstract |
Listener for intercepting generic motion dispatch events. |
abstract |
Listener for intercepting touch dispatch events. |
abstract | |
abstract |
Defines behavior of duration and interpolator for smoothScrollBy(). |
Constants | |
---|---|
static Float |
Value indicates that percent is not used. |
static Int |
Save on screen views plus save off screen child views without any limitation. |
static Int |
Save on screen views plus save off screen child views states up to |
static Int |
Dont save states of any child views. |
static Int |
Only save on screen child views, the states are lost when they become off screen. |
static Int |
The first item and last item are aligned with the two edges of the viewport. |
static Int |
The last item is aligned with the high edge of the viewport when navigating to the end of list. |
static Int |
The first item is aligned with the low edge of the viewport. |
static Int |
The focused item always stays in a key line location. |
static Float |
Value indicates that percent is not used. |
Inherited constants | |
---|---|
Public methods | |
---|---|
open Unit |
Registers a callback to be invoked when an item in BaseGridView has been selected. |
Unit |
addOnLayoutCompletedListener(@NonNull listener: BaseGridView.OnLayoutCompletedListener) Registers a callback to be invoked when the BaseGridView completes a full layout calculation. |
open Unit |
Undo animateOut() and slide in child views. |
open Unit |
Temporarily slide out child views to bottom (for VerticalGridView) or end (for HorizontalGridView). |
open Boolean |
dispatchKeyEvent(event: KeyEvent!) |
open Boolean |
dispatchTouchEvent(event: MotionEvent!) |
open View! |
focusSearch(direction: Int) |
open Int |
getChildDrawingOrder(childCount: Int, i: Int) |
open Int |
Returns the spacing in pixels between two child items horizontally. |
open Int |
Returns the horizontal spacing in pixels between two child items. |
open Int |
Gets the number of items to prefetch in |
open Int |
Returns number of pixels to the end of low edge. |
open Float |
Returns the offset percent for item alignment in addition to |
open Int |
Returns the id of the view to align with, or |
open BaseGridView.OnUnhandledKeyListener! |
Returns the unhandled key listener. |
Int |
Returns the limit used when when |
Int |
Returns the policy for saving children. |
open Int |
Returns the adapter position of selected item. |
open BaseGridView.SmoothScrollByBehavior? |
Returns custom behavior for smoothScrollBy(). |
Int |
When holding DPAD, DPAD events are generated faster than the grid view can scroll. |
Float | |
open Int |
Returns the spacing in pixels between two child items vertically. |
open Int |
Returns the vertical spacing in pixels between two child items. |
open Unit |
getViewSelectedOffsets(view: View!, offsets: IntArray!) Returns the x/y offsets to final position from current position if the view is selected. |
open Int |
Returns the method for focused item alignment in the view. |
open Int |
Returns the offset in pixels for window alignment key line. |
open Float |
Returns the offset percent for window alignment key line in addition to |
open Boolean | |
open Boolean |
hasPreviousViewInSameRow(position: Int) Returns true if the view at the given position has a same row sibling in front of it. |
open Boolean |
Returns true if an animation will run when a child changes size or when adding or removing a child. |
open Boolean |
Returns true if draws selected child at last, false otherwise. |
Boolean |
Returns true if focus search is disabled. |
open Boolean |
Returns true if applies padding to item alignment when |
open Boolean |
Returns true if scrolling is enabled, false otherwise. |
open Boolean |
Returns whether prefer key line over high edge when |
open Boolean |
Returns whether prefer key line over low edge when |
open Boolean |
onRequestFocusInDescendants(direction: Int, previouslyFocusedRect: Rect!) |
open Unit |
onRtlPropertiesChanged(layoutDirection: |