added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
PresenterSwitcher
public
abstract
class
PresenterSwitcher
extends Object
java.lang.Object | |
↳ | android.support.v17.leanback.widget.PresenterSwitcher |
![]() |
An abstract helper class that switches a view in its parent view using a
PresenterSelector
. A subclass should implement insertView(View)
to define
how to add the view in parent, and may optionally override onViewSelected(View)
.
Summary
Public constructors | |
---|---|
PresenterSwitcher()
|
Public methods | |
---|---|
void
|
clear()
Destroys created views. |
final
ViewGroup
|
getParentViewGroup()
Returns the parent. |
void
|
init(ViewGroup parent, PresenterSelector presenterSelector)
Initializes the switcher with a parent view to insert view into and a
|
void
|
select(Object object)
Selects a view based on the given object and shows that view. |
void
|
unselect()
Hides the view. |
Protected methods | |
---|---|
abstract
void
|
insertView(View view)
|
void
|
onViewSelected(View view)
Called when a view is bound to the object of |
void
|
showView(View view, boolean visible)
|
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Public constructors
Public methods
getParentViewGroup
added in version 22.1.0