public static class AbstractMediaItemPresenter.ViewHolder
extends RowPresenter.ViewHolder
java.lang.Object | |||
↳ | android.support.v17.leanback.widget.Presenter.ViewHolder | ||
↳ | android.support.v17.leanback.widget.RowPresenter.ViewHolder | ||
↳ | android.support.v17.leanback.widget.AbstractMediaItemPresenter.ViewHolder |
ViewHolder为AbstractMediaItemPresenter
。 它引用了不同的视图,这些视图放置了与媒体项目细节,动作,选择器,监听器和演示者相对应的不同元数据,
Inherited fields |
---|
From class android.support.v17.leanback.widget.RowPresenter.ViewHolder
|
From class android.support.v17.leanback.widget.Presenter.ViewHolder
|
Public constructors |
|
---|---|
AbstractMediaItemPresenter.ViewHolder(View view) |
Public methods |
|
---|---|
ViewGroup |
getMediaItemActionsContainer() |
View |
getMediaItemDetailsView() |
TextView |
getMediaItemDurationView() |
TextView |
getMediaItemNameView() |
TextView |
getMediaItemNumberView() |
MultiAction[] |
getMediaItemRowActions() |
View |
getMediaItemRowSeparator() |
View |
getSelectorView() |
void |
notifyActionChanged(MultiActionsProvider.MultiAction action) 通知此媒体行中的操作已更改,并且UI需要更新 |
void |
notifyDetailsChanged() 通知行中媒体项目详细信息的内容已更改并触发更新UI。 |
void |
onBindRowActions() 将媒体项目行对象中的操作绑定到其视图。 |
Inherited methods |
|
---|---|
From class android.support.v17.leanback.widget.RowPresenter.ViewHolder
|
|
From class android.support.v17.leanback.widget.Presenter.ViewHolder
|
|
From class java.lang.Object
|
|
From interface android.support.v17.leanback.widget.FacetProvider
|
AbstractMediaItemPresenter.ViewHolder (View view)
Parameters | |
---|---|
view |
View
|
ViewGroup getMediaItemActionsContainer ()
Returns | |
---|---|
ViewGroup |
The view containing the set of custom actions |
View getMediaItemDetailsView ()
Returns | |
---|---|
View |
The view container of track details |
TextView getMediaItemDurationView ()
Returns | |
---|---|
TextView |
The TextView responsible for rendering the track duration |
TextView getMediaItemNameView ()
Returns | |
---|---|
TextView |
The TextView responsible for rendering the track name |
TextView getMediaItemNumberView ()
Returns | |
---|---|
TextView |
The TextView responsible for rendering the track number |
View getMediaItemRowSeparator ()
Returns | |
---|---|
View |
The view responsible for rendering the separator line between media rows |
View getSelectorView ()
Returns | |
---|---|
View |
The SelectorView responsible for highlighting the in-focus view within each media item row |
void notifyActionChanged (MultiActionsProvider.MultiAction action)
通知此媒体行中的操作已更改,并且UI需要更新
Parameters | |
---|---|
action |
MultiActionsProvider.MultiAction : The action whose state has changed |
void notifyDetailsChanged ()
通知行中媒体项目详细信息的内容已更改并触发更新UI。 这会导致用户提供的演示者上的onBindMediaDetails(ViewHolder, Object)
被回叫,从而允许他们相应地更新UI。
void onBindRowActions ()
将媒体项目行对象中的操作绑定到其视图。 这包括创建(或重复使用现有的)操作视图持有者,并将其填充到操作图标。