Google 致力于为黑人社区推动种族平等。查看具体举措

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 getSaveChildrenLimitNumber().

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