TitleView
class TitleView : FrameLayout, TitleViewAdapter.Provider
| kotlin.Any | ||||
| ↳ | android.view.View | |||
| ↳ | android.view.ViewGroup | |||
| ↳ | android.widget.FrameLayout | |||
| ↳ | androidx.leanback.widget.TitleView |
Title view for a leanback fragment.
Summary
Public constructors |
|---|
TitleView(context: Context, attrs: AttributeSet?) |
TitleView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) |
Public functions |
|
|---|---|
Unit |
enableAnimation(enable: Boolean)Enables or disables any view animations. |
Drawable? |
Returns the badge drawable. |
SearchOrbView.Colors? |
Returns the |
View |
Returns the view for the search affordance. |
CharSequence? |
getTitle()Returns the title text. |
TitleViewAdapter |
Returns |
Unit |
setBadgeDrawable(drawable: Drawable?)Sets the badge drawable. |
Unit |
setOnSearchClickedListener(listener: View.OnClickListener?)Sets the listener to be called when the search affordance is clicked. |
Unit |
Sets the |
Unit |
setTitle(titleText: CharSequence?)Sets the title text. |
Unit |
updateComponentsVisibility(flags: Int)Based on the flag, it updates the visibility of the individual components - BadgeView, TextView and SearchView. |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
Public functions
enableAnimation
fun enableAnimation(enable: Boolean): Unit
Enables or disables any view animations.
getSearchAffordanceColors
fun getSearchAffordanceColors(): SearchOrbView.Colors?
Returns the SearchOrbView.Colors used to draw the search affordance.
getSearchAffordanceView
fun getSearchAffordanceView(): View
Returns the view for the search affordance.
getTitleViewAdapter
fun getTitleViewAdapter(): TitleViewAdapter
Returns TitleViewAdapter to be implemented by the customized widget class.
| Returns | |
|---|---|
TitleViewAdapter |
|
setBadgeDrawable
fun setBadgeDrawable(drawable: Drawable?): Unit
Sets the badge drawable. If non-null, the drawable is displayed instead of the title text.
setOnSearchClickedListener
fun setOnSearchClickedListener(listener: View.OnClickListener?): Unit
Sets the listener to be called when the search affordance is clicked.
setSearchAffordanceColors
fun setSearchAffordanceColors(colors: SearchOrbView.Colors): Unit
Sets the SearchOrbView.Colors used to draw the search affordance.
updateComponentsVisibility
fun updateComponentsVisibility(flags: Int): Unit
Based on the flag, it updates the visibility of the individual components - BadgeView, TextView and SearchView.
| Parameters | |
|---|---|
flags: Int |
integer representing the visibility of TitleView components. |