Android APIs
public abstract class

PresenterSwitcher

extends Object
java.lang.Object
   ↳ android.support.v17.leanback.widget.PresenterSwitcher
Known Direct Subclasses

Class Overview

An abstract helper class that switches view in parent view using PresenterSelector subclass should define insertView(View) of how to add the view in parent and optionally override onViewSelected(View).

Summary

Public Constructors
PresenterSwitcher()
Public Methods
void clear()
Destroy created views.
final ViewGroup getParentViewGroup()
void init(ViewGroup parent, PresenterSelector presenterSelector)
Initialize switcher with a parent view to insert view into and a PresenterSelector for choose Presenter for object.
void select(Object object)
void unselect()
Protected Methods
abstract void insertView(View view)
void onViewSelected(View view)
Called when a view is bound to the object of select(Object).
void showView(View view, boolean visible)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PresenterSwitcher ()

Public Methods

public void clear ()

Destroy created views.

public final ViewGroup getParentViewGroup ()

public void init (ViewGroup parent, PresenterSelector presenterSelector)

Initialize switcher with a parent view to insert view into and a PresenterSelector for choose Presenter for object. This will destroy any existing views.

public void select (Object object)

public void unselect ()

Protected Methods

protected abstract void insertView (View view)

protected void onViewSelected (View view)

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

protected void showView (View view, boolean visible)