TitleView

open 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
<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Public methods
open Unit

Sets the badge drawable.

open Drawable!

Returns the badge drawable.

open Unit

Based on the flag, it updates the visibility of the individual components - BadgeView, TextView and SearchView.

open Unit

Sets the listener to be called when the search affordance is clicked.

open Unit

Enables or disables any view animations.

open View!

Returns the view for the search affordance.

open CharSequence!

Returns the title text.

open Unit

Sets the SearchOrbView.Colors used to draw the search affordance.

open Unit
setTitle(titleText: CharSequence!)

Sets the title text.

open SearchOrbView.Colors!

Returns the SearchOrbView.Colors used to draw the search affordance.

open TitleViewAdapter!

Public constructors

<init>

TitleView(context: Context!)

<init>

TitleView(context: Context!, attrs: AttributeSet!)

<init>

TitleView(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Public methods

setBadgeDrawable

open fun setBadgeDrawable(drawable: Drawable!): Unit

Sets the badge drawable. If non-null, the drawable is displayed instead of the title text.

getBadgeDrawable

open fun getBadgeDrawable(): Drawable!

Returns the badge drawable.

updateComponentsVisibility

open 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.

setOnSearchClickedListener

open fun setOnSearchClickedListener(listener: OnClickListener!): Unit

Sets the listener to be called when the search affordance is clicked.

enableAnimation

open fun enableAnimation(enable: Boolean): Unit

Enables or disables any view animations.

getSearchAffordanceView

open fun getSearchAffordanceView(): View!

Returns the view for the search affordance.

getTitle

open fun getTitle(): CharSequence!

Returns the title text.

setSearchAffordanceColors

open fun setSearchAffordanceColors(colors: SearchOrbView.Colors!): Unit

Sets the SearchOrbView.Colors used to draw the search affordance.

setTitle

open fun setTitle(titleText: CharSequence!): Unit

Sets the title text.

getSearchAffordanceColors

open fun getSearchAffordanceColors(): SearchOrbView.Colors!

Returns the SearchOrbView.Colors used to draw the search affordance.

getTitleViewAdapter

open fun getTitleViewAdapter(): TitleViewAdapter!