Most visited

Recently visited

TitleView

public class TitleView
extends FrameLayout implements TitleViewAdapter.Provider

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ android.support.v17.leanback.widget.TitleView


leanback片段的标题视图。

Summary

Inherited XML attributes

From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View

Inherited constants

From class android.view.ViewGroup
From class android.view.View

Inherited fields

From class android.view.View

Public constructors

TitleView(Context context)
TitleView(Context context, AttributeSet attrs)
TitleView(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

void enableAnimation(boolean enable)

启用或禁用任何视图动画。

Drawable getBadgeDrawable()

返回可绘制的徽章。

SearchOrbView.Colors getSearchAffordanceColors()

返回用于绘制搜索 SearchOrbView.Colors

View getSearchAffordanceView()

返回搜索可供性的视图。

CharSequence getTitle()

返回标题文本。

TitleViewAdapter getTitleViewAdapter()

返回 TitleViewAdapter由自定义窗口小部件类实现。

void setBadgeDrawable(Drawable drawable)

设置可绘制的徽章。

void setOnSearchClickedListener(View.OnClickListener listener)

设置单击搜索可供性时调用的侦听器。

void setSearchAffordanceColors(SearchOrbView.Colors colors)

设置用于绘制搜索示能表示的 SearchOrbView.Colors

void setTitle(CharSequence titleText)

设置标题文本。

void updateComponentsVisibility(int flags)

基于标志,它更新了各个组件的可见性 - BadgeView,TextView和SearchView。

Inherited methods

From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource
From interface android.support.v17.leanback.widget.TitleViewAdapter.Provider

Public constructors

TitleView

TitleView (Context context)

Parameters
context Context

TitleView

TitleView (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

TitleView

TitleView (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context
attrs AttributeSet
defStyleAttr int

Public methods

enableAnimation

void enableAnimation (boolean enable)

启用或禁用任何视图动画。

Parameters
enable boolean

getBadgeDrawable

Drawable getBadgeDrawable ()

返回可绘制的徽章。

Returns
Drawable

getSearchAffordanceColors

SearchOrbView.Colors getSearchAffordanceColors ()

返回用于绘制搜索 SearchOrbView.Colors

Returns
SearchOrbView.Colors

getSearchAffordanceView

View getSearchAffordanceView ()

返回搜索可供性的视图。

Returns
View

getTitle

CharSequence getTitle ()

返回标题文本。

Returns
CharSequence

getTitleViewAdapter

TitleViewAdapter getTitleViewAdapter ()

返回 TitleViewAdapter由自定义窗口小部件类实现。

Returns
TitleViewAdapter TitleViewAdapter to be implemented by the customized widget class.

setBadgeDrawable

void setBadgeDrawable (Drawable drawable)

设置可绘制的徽章。 如果非null,则显示drawable而不是标题文本。

Parameters
drawable Drawable

setOnSearchClickedListener

void setOnSearchClickedListener (View.OnClickListener listener)

设置单击搜索可供性时调用的侦听器。

Parameters
listener View.OnClickListener

setSearchAffordanceColors

void setSearchAffordanceColors (SearchOrbView.Colors colors)

设置用于绘制搜索示能表示的 SearchOrbView.Colors

Parameters
colors SearchOrbView.Colors

setTitle

void setTitle (CharSequence titleText)

设置标题文本。

Parameters
titleText CharSequence

updateComponentsVisibility

void updateComponentsVisibility (int flags)

基于标志,它更新了各个组件的可见性 - BadgeView,TextView和SearchView。

Parameters
flags int: integer representing the visibility of TitleView components.

也可以看看:

Hooray!