BrandedFragment
open classBrandedFragment: Fragment
kotlin.Any | ||
↳ | android.app.Fragment | |
↳ | androidx.leanback.app.BrandedFragment |
Fragment class for managing search and branding using a view that implements TitleViewAdapter.Provider
.
Summary
Public constructors | |
---|---|
<init>() Fragment class for managing search and branding using a view that implements |
Public methods | |
---|---|
open Drawable! |
Returns the badge drawable used in the fragment title. |
open Int |
Returns the color used to draw the search affordance. |
open SearchOrbView.Colors! |
Returns the |
open CharSequence! |
getTitle() Returns the title text for the fragment. |
open View! |
Returns the view that implements |
open TitleViewAdapter! |
Returns the |
open Unit |
installTitleView(inflater: LayoutInflater!, parent: ViewGroup!, savedInstanceState: Bundle!) Inflate title view and add to parent. |
Boolean |
Returns true/false to indicate the visibility of TitleView. |
open Unit | |
open View! |
onInflateTitleView(inflater: LayoutInflater!, parent: ViewGroup!, savedInstanceState: Bundle!) Called by |
open Unit |
onPause() |
open Unit |
onResume() |
open Unit |
onSaveInstanceState(outState: Bundle!) |
open Unit |
onStart() |
open Unit |
onViewCreated(@NonNull view: View, @Nullable savedInstanceState: Bundle?) |
open Unit |
setBadgeDrawable(drawable: Drawable!) Sets the drawable displayed in the fragment title. |
open Unit |
setOnSearchClickedListener(listener: OnClickListener!) Sets a click listener for the search affordance. |
open Unit |
setSearchAffordanceColor(color: Int) Sets the color used to draw the search affordance. |
open Unit |
Sets the |
open Unit |
setTitle(title: CharSequence!) Sets title text for the fragment. |
open Unit |
setTitleView(titleView: View!) Sets the view that implemented |
open Unit |
Shows or hides the title view. |
open Unit |
Changes title view's components visibility and shows title. |
Public constructors
<init>
BrandedFragment()
Deprecated: use BrandedSupportFragment
Fragment class for managing search and branding using a view that implements TitleViewAdapter.Provider
.
Public methods
getBadgeDrawable
open fun getBadgeDrawable(): Drawable!
Returns the badge drawable used in the fragment title.
Return | |
---|---|
Drawable! |
The badge drawable used in the fragment title. |
getSearchAffordanceColor
open fun getSearchAffordanceColor(): Int
Returns the color used to draw the search affordance.
getSearchAffordanceColors
open fun getSearchAffordanceColors(): SearchOrbView.Colors!
Returns the androidx.leanback.widget.SearchOrbView.Colors
used to draw the search affordance.
getTitle
open fun getTitle(): CharSequence!
Returns the title text for the fragment.
Return | |
---|---|
CharSequence! |
Title text for the fragment. |
getTitleView
open fun getTitleView(): View!
Returns the view that implements TitleViewAdapter.Provider
.
Return | |
---|---|
View! |
The view that implements TitleViewAdapter.Provider . |
getTitleViewAdapter
open fun getTitleViewAdapter(): TitleViewAdapter!
Returns the TitleViewAdapter
implemented by title view.
Return | |
---|---|
TitleViewAdapter! |
The TitleViewAdapter implemented by title view. |
installTitleView
open fun installTitleView(
inflater: LayoutInflater!,
parent: ViewGroup!,
savedInstanceState: Bundle!
): Unit
Inflate title view and add to parent. This method should be called in Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)
.
Parameters | |
---|---|
inflater |
LayoutInflater!: The LayoutInflater object that can be used to inflate any views in the fragment, |
parent |
ViewGroup!: Parent of title view. |
savedInstanceState |
Bundle!: If non-null, this fragment is being re-constructed from a previous saved state as given here. |
isShowingTitle
fun isShowingTitle(): Boolean
Returns true/false to indicate the visibility of TitleView.
Return | |
---|---|
Boolean |
boolean to indicate whether or not it's showing the title. |
onDestroyView
open fun onDestroyView(): Unit
onInflateTitleView
open fun onInflateTitleView(
inflater: LayoutInflater!,
parent: ViewGroup!,
savedInstanceState: Bundle!
): View!
Called by installTitleView(LayoutInflater, ViewGroup, Bundle)
to inflate title view. Default implementation uses layout file lb_browse_title. Subclass may override and use its own layout, the layout must have a descendant with id browse_title_group that implements TitleViewAdapter.Provider
. Subclass may return null if no title is needed.
Parameters | |
---|---|
inflater |
LayoutInflater!: The LayoutInflater object that can be used to inflate any views in the fragment, |
parent |
ViewGroup!: Parent of title view. |
savedInstanceState |
Bundle!: If non-null, this fragment is being re-constructed from a previous saved state as given here. |
Return | |
---|---|
View! |
Title view which must have a descendant with id browse_title_group that implements TitleViewAdapter.Provider , or null for no title view. |
onPause
open fun onPause()