Most visited

Recently visited

PresenterSwitcher

public abstract class PresenterSwitcher
extends Object

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


使用PresenterSelector在其父视图中切换视图的抽象帮助器类。 子类应实现insertView(View)来定义如何在父级添加视图,并可以选择覆盖onViewSelected(View)

Summary

Public constructors

PresenterSwitcher()

Public methods

void clear()

销毁创建的视图。

final ViewGroup getParentViewGroup()

返回父级。

void init(ViewGroup parent, PresenterSelector presenterSelector)

使用父视图初始化切换器,以便将视图插入到 PresenterSelectorPresenter为给定对象选择 Presenter

void select(Object object)

根据给定的对象选择视图并显示该视图。

void unselect()

隐藏视图。

Protected methods

abstract void insertView(View view)
void onViewSelected(View view)

当视图绑定到 select(Object)的对象时 select(Object)

void showView(View view, boolean visible)

Inherited methods

From class java.lang.Object

Public constructors

PresenterSwitcher

PresenterSwitcher ()

Public methods

clear

void clear ()

销毁创建的视图。

getParentViewGroup

ViewGroup getParentViewGroup ()

返回父级。

Returns
ViewGroup

init

void init (ViewGroup parent, 
                PresenterSelector presenterSelector)

使用父视图初始化切换器以将视图插入到PresenterSelectorPresenter为给定对象选择Presenter 这会破坏所有现有的视图。

Parameters
parent ViewGroup
presenterSelector PresenterSelector

select

void select (Object object)

根据给定的对象选择视图并显示该视图。

Parameters
object Object

unselect

void unselect ()

隐藏视图。

Protected methods

insertView

void insertView (View view)

Parameters
view View

onViewSelected

void onViewSelected (View view)

当视图绑定到 select(Object)的对象时 select(Object)

Parameters
view View

showView

void showView (View view, 
                boolean visible)

Parameters
view View
visible boolean

Hooray!