Stay organized with collections Save and categorize content based on your preferences.
added in version 24.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
Deprecated since version 27.1.0

BrandedFragment

public class BrandedFragment
extends Fragment

java.lang.Object
   ↳ android.app.Fragment
     ↳ android.support.v17.leanback.app.BrandedFragment
Known Direct Subclasses
Known Indirect Subclasses


This class was deprecated in API level 27.1.0.
use BrandedSupportFragment

Fragment class for managing search and branding using a view that implements TitleViewAdapter.Provider.

Summary

Inherited constants

From interface android.content.ComponentCallbacks2

Public constructors

BrandedFragment()

Public methods

Drawable getBadgeDrawable()

Returns the badge drawable used in the fragment title.

int getSearchAffordanceColor()

Returns the color used to draw the search affordance.

SearchOrbView.Colors getSearchAffordanceColors()

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

CharSequence getTitle()

Returns the title text for the fragment.

View getTitleView()

Returns the view that implements TitleViewAdapter.Provider.

TitleViewAdapter getTitleViewAdapter()

Returns the TitleViewAdapter implemented by title view.

void installTitleView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState)

Inflate title view and add to parent.

final boolean isShowingTitle()

Returns true/false to indicate the visibility of TitleView.

void onDestroyView()
View onInflateTitleView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState)

Called by installTitleView(LayoutInflater, ViewGroup, Bundle) to inflate title view.

void onPause()
void onResume()
void onSaveInstanceState(Bundle outState)
void onStart()
void onViewCreated(View view, Bundle savedInstanceState)
void setBadgeDrawable(Drawable drawable)

Sets the drawable displayed in the fragment title.

void setOnSearchClickedListener(View.OnClickListener listener)

Sets a click listener for the search affordance.

void setSearchAffordanceColor(int color)

Sets the color used to draw the search affordance.

void setSearchAffordanceColors(SearchOrbView.Colors colors)

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

void setTitle(CharSequence title)

Sets title text for the fragment.

void setTitleView(View titleView)

Sets the view that implemented TitleViewAdapter.

void showTitle(int flags)

Changes title view's components visibility and shows title.

void showTitle(boolean show)

Shows or hides the title view.

Inherited methods

From class android.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks2
From interface android.view.View.OnCreateContextMenuListener
From interface android.content.ComponentCallbacks

Public constructors

BrandedFragment

added in version 24.1.0
BrandedFragment ()

Public methods

getBadgeDrawable

added in version 22.1.0
Drawable getBadgeDrawable ()

Returns the badge drawable used in the fragment title.

Returns
Drawable The badge drawable used in the fragment title.

getSearchAffordanceColor

added in version 24.1.0
int getSearchAffordanceColor ()

Returns the color used to draw the search affordance.

Returns
int

getSearchAffordanceColors

added in version 24.1.0
SearchOrbView.Colors getSearchAffordanceColors ()

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

Returns
SearchOrbView.Colors

getTitle

added in version 22.1.0
CharSequence getTitle ()

Returns the title text for the fragment.

Returns
CharSequence Title text for the fragment.

getTitleView

added in version 24.1.0
View getTitleView ()

Returns the view that implements TitleViewAdapter.Provider.

Returns
View The view that implements TitleViewAdapter.Provider.

getTitleViewAdapter

added in version 24.1.0
TitleViewAdapter getTitleViewAdapter ()

Returns the TitleViewAdapter implemented by title view.

Returns
TitleViewAdapter The