Support classes providing low level Leanback user interface building blocks: widgets and helpers.

The core interface to the developer’s model is the ObjectAdapter. It is similar to Adapter and the RecyclerView Adapter, but separates iterating items from presenting them as Views. Concrete implementations include ArrayObjectAdapter and CursorObjectAdapter, but a developer is free to use a subclass of an ObjectAdapter to iterate over any existing Object hierarchy.

A Presenter creates Views and binds data from an Object to those Views. This is the complementary piece to ObjectAdapter that corresponds to existing Android adapter classes. The benefit to separating out a Presenter is that we can use it to generate Views outside of the context of an adapter. For example, a UI may represent data from a single Object in several places at once. Each View that needs to be generated can be produced by a different Presenter, while the Object is retrieved from the ObjectAdapter once.

A PresenterSelector determines which Presenter to use for a given Object from an ObjectAdapter. Two common cases are when an ObjectAdapter uses the same View type for every element (SinglePresenterSelector), and when the Presenter is determined by the Java class of the element (ClassPresenterSelector). A developer is able to implement any selection logic as a PresenterSelector. For example, if all the elements of an ObjectAdapter have the same type, but certain elements are to be rendered using a 'promotional content' view in the developer’s application, the PresenterSelector may inspect the fields of each element before choosing the appropriate Presenter.

The basic navigation model for Leanback is that of a vertical list of rows, each of which may be a horizontal list of items. Therefore, Leanback uses ObjectAdapters both for defining the horizontal data items as well as the list of rows themselves.

Leanback defines a few basic data model classes for rows: the Row, which defines the abstract concept of a row with a header; and ListRow, a concrete Row implementation that uses an ObjectAdapter to present a horizontal list of items. The corresponding presenter for the ListRow is the ListRowPresenter.

Other types of Rows and corresponding RowPresenters are provided; however the application may define a custom subclass of Row and RowPresenter.


BaseGridView.OnKeyInterceptListener Listener for intercepting key dispatch events. 
BaseGridView.OnLayoutCompletedListener Interface for receiving notification when BaseGridView has completed a full layout calculation. 
BaseGridView.OnMotionInterceptListener Listener for intercepting generic motion dispatch events. 
BaseGridView.OnTouchInterceptListener Listener for intercepting touch dispatch events. 
BaseGridView.SmoothScrollByBehavior Defines behavior of duration and interpolator for smoothScrollBy(). 
BaseOnItemViewClickedListener<T> Interface for receiving notification when an item view holder is clicked. 
BaseOnItemViewSelectedListener<T> Interface for receiving notification when a row or item becomes selected. 
BrowseFrameLayout.OnChildFocusListener Interface for managing child focus in a BrowseFrameLayout. 
BrowseFrameLayout.OnFocusSearchListener Interface for selecting a focused view in a BrowseFrameLayout when the system focus finder couldn't find a view to focus. 
FacetProvider This is the query interface to supply optional features(aka facets) on an object without the need of letting the object to subclass or implement java interfaces. 
FacetProviderAdapter Optional interface that implemented by RecyclerView.Adapter to query FacetProvider for a given item view type within Adapter. 
FocusHighlight Interface for highlighting the item that has focus. 
FragmentAnimationProvider FragmentAnimationProvider supplies animations for use during a fragment's onCreateAnimator callback. 
GuidedActionAutofillSupport Interface for a custom EditText subclass to support autofill in GuidedStepSupportFragment
GuidedActionAutofillSupport.OnAutofillListener Listener for autofill event. 
ImeKeyMonitor Interface for an EditText subclass that can delegate calls to onKeyPreIme up to a registered listener. 
ImeKeyMonitor.ImeKeyListener Listener interface for key events intercepted pre-IME by edit text objects. 
MultiActionsProvider An interface implemented by the user if they wish to provide actions for a media item row to be displayed by an AbstractMediaItemPresenter
OnActionClickedListener Interface for receiving notification when an Action is clicked. 
OnChildLaidOutListener Interface for receiving notification when a child of this ViewGroup has been laid out. 
OnChildSelectedListener This interface is deprecated. Use OnChildViewHolderSelectedListener  
OnItemViewClickedListener Interface for receiving notification when a item view holder is clicked. 
OnItemViewSelectedListener Interface for receiving notification when a row or item becomes selected. 
PlaybackSeekUi Interface to be implemented by UI component to support seeking. 
SearchBar.SearchBarListener Interface for receiving notification of search query changes. 
SearchBar.SearchBarPermissionListener Interface that handles runtime permissions requests. 
SearchEditText.OnKeyboardDismissListener Interface for receiving notification when the keyboard is dismissed. 
SpeechRecognitionCallback This interface is deprecated. Launching voice recognition activity is no longer supported. App should declare android.permission.RECORD_AUDIO in AndroidManifest file. See details in SearchSupportFragment.  
TitleViewAdapter.Provider Interface to be implemented by a customized widget class to implement TitleViewAdapter
ViewHolderTask Interface for schedule task on a ViewHolder. 


AbstractDetailsDescriptionPresenter An abstract Presenter for rendering a detailed description of an item. 
AbstractDetailsDescriptionPresenter.ViewHolder The ViewHolder for the AbstractDetailsDescriptionPresenter
AbstractMediaItemPresenter Abstract Presenter class for rendering media items in a playlist format. 
AbstractMediaItemPresenter.ViewHolder The ViewHolder for the AbstractMediaItemPresenter
AbstractMediaListHeaderPresenter Abstract presenter class for rendering the header for a list of media items in a playlist. 
AbstractMediaListHeaderPresenter.ViewHolder The ViewHolder for the AbstractMediaListHeaderPresenter
Action An action contains one or two lines of text, an optional image and an optional id. 
ArrayObjectAdapter An ObjectAdapter implemented with an ArrayList