HorizontalHoverCardSwitcher


class HorizontalHoverCardSwitcher : PresenterSwitcher


A helper class for showing a hover card view below a HorizontalGridView. The hover card is aligned to the starting edge of the selected child view. If there is no space when scrolling to the end, the ending edge of the hover card will be aligned to the ending edge of the parent view, excluding padding.

Summary

Public constructors

Public functions

Unit
select(gridView: HorizontalGridView!, childView: View!, object: Any!)

Select a childView inside a grid view and create/bind a corresponding hover card view for the object.

Protected functions

Unit
insertView(view: View!)
Unit

Called when a view is bound to the object of select.

Inherited functions

From androidx.leanback.widget.PresenterSwitcher
Unit

Destroys created views.

ViewGroup!

Returns the parent.

Unit
init(parent: ViewGroup!, presenterSelector: PresenterSelector!)

Initializes the switcher with a parent view to insert view into and a PresenterSelector for choosing a Presenter for a given object.

Unit
select(object: Any!)

Selects a view based on the given object and shows that view.

Unit
showView(view: View!, visible: Boolean)
Unit

Hides the view.

Public constructors

HorizontalHoverCardSwitcher

Added in 1.1.0
HorizontalHoverCardSwitcher()

Public functions

select

Added in 1.1.0
fun select(gridView: HorizontalGridView!, childView: View!, object: Any!): Unit

Select a childView inside a grid view and create/bind a corresponding hover card view for the object.

Protected functions

insertView

Added in 1.2.0-alpha04
protected fun insertView(view: View!): Unit

onViewSelected

protected fun onViewSelected(view: View!): Unit

Called when a view is bound to the object of select.