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 | |
| |
| |
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 |
|---|
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 |
CharSequence | getTitle() Returns the title text for the fragment. |
View | getTitleView() Returns the view that implements |
TitleViewAdapter | getTitleViewAdapter() Returns the |
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 |
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 |
void | setTitle(CharSequence title) Sets title text for the fragment. |
void | setTitleView(View titleView) Sets the view that implemented |
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 | |
|---|---|
android.app.Fragment | |
java.lang.Object | |
android.content.ComponentCallbacks2 | |
android.view.View.OnCreateContextMenuListener | |
android.content.ComponentCallbacks | |
Public constructors
Public methods
getBadgeDrawable
Drawable getBadgeDrawable ()
Returns the badge drawable used in the fragment title.
| Returns | |
|---|---|
Drawable | The badge drawable used in the fragment title. |
getSearchAffordanceColor
int getSearchAffordanceColor ()
Returns the color used to draw the search affordance.
| Returns | |
|---|---|
int | |
getSearchAffordanceColors
SearchOrbView.Colors getSearchAffordanceColors ()
Returns the SearchOrbView.Colors used to draw the search affordance.
| Returns | |
|---|---|
SearchOrbView.Colors | |
getTitle
CharSequence getTitle ()
Returns the title text for the fragment.
| Returns | |
|---|---|
CharSequence | Title text for the fragment. |
getTitleView
View getTitleView ()
Returns the view that implements TitleViewAdapter.Provider.
| Returns | |
|---|---|
View | The view that implements TitleViewAdapter.Provider. |
getTitleViewAdapter
TitleViewAdapter getTitleViewAdapter ()
Returns the TitleViewAdapter implemented by title view.
| Returns | |
|---|---|
TitleViewAdapter | The TitleViewAdapter implemented by title view. |
installTitleView
void installTitleView (LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState)
Inflate title view and add to parent. This method should be called in 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
boolean isShowingTitle ()
Returns true/false to indicate the visibility of TitleView.
| Returns | |
|---|---|
boolean | boolean to indicate whether or not it's showing the title. |
onDestroyView
void onDestroyView ()
onInflateTitleView
View onInflateTitleView (LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState)
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. |
| Returns | |
|---|---|
View | Title view which must have a descendant with id browse_title_group that implements TitleViewAdapter.Provider, or null for no title view. |
onPause
void onPause ()
onResume
void onResume ()
onStart
void onStart ()
onViewCreated
void onViewCreated (View view, Bundle savedInstanceState)
| Parameters | |
|---|---|
view | View |
savedInstanceState | Bundle |
setBadgeDrawable
void setBadgeDrawable (Drawable drawable)
Sets the drawable displayed in the fragment title.
| Parameters | |
|---|---|
drawable | Drawable: The Drawable to display in the fragment title. |
setOnSearchClickedListener
void setOnSearchClickedListener (View.OnClickListener listener)
Sets a click listener for the search affordance.
The presence of a listener will change the visibility of the search affordance in the fragment title. When set to non-null, the title will contain an element that a user may click to begin a search.
The listener's onClick method will be invoked when the user clicks on the search element.
| Parameters | |
|---|---|
listener | View.OnClickListener: The listener to call when the search element is clicked. |
setSearchAffordanceColor
void setSearchAffordanceColor (int color)
Sets the color used to draw the search affordance. A default brighter color will be set by the framework.
| Parameters | |
|---|---|
color | int: The color to use for the search affordance. |
setSearchAffordanceColors
void setSearchAffordanceColors (SearchOrbView.Colors colors)
Sets the SearchOrbView.Colors used to draw the search affordance.
| Parameters | |
|---|---|
colors | SearchOrbView.Colors: Colors used to draw search affordance. |
setTitle
void setTitle (CharSequence title)
Sets title text for the fragment.
| Parameters | |
|---|---|
title | CharSequence: The title text of the fragment. |
setTitleView
void setTitleView (View titleView)
Sets the view that implemented TitleViewAdapter.
| Parameters | |
|---|---|
titleView | View: The view that implemented TitleViewAdapter.Provider. |
showTitle
void showTitle (int flags)
Changes title view's components visibility and shows title.
| Parameters | |
|---|---|
flags | int: Flags representing the visibility of components inside title view. |
showTitle
void showTitle (boolean show)
Shows or hides the title view.
| Parameters | |
|---|---|
show | boolean: True to show title view, false to hide title view. |
Interfaces
- BrowseFragment.FragmentHost
- BrowseFragment.MainFragmentAdapterProvider
- BrowseFragment.MainFragmentRowsAdapterProvider
- BrowseSupportFragment.FragmentHost
- BrowseSupportFragment.MainFragmentAdapterProvider
- BrowseSupportFragment.MainFragmentRowsAdapterProvider
- HeadersFragment.OnHeaderClickedListener
- HeadersFragment.OnHeaderViewSelectedListener
- HeadersSupportFragment.OnHeaderClickedListener
- HeadersSupportFragment.OnHeaderViewSelectedListener
- SearchFragment.SearchResultProvider
- SearchSupportFragment.SearchResultProvider
Classes
- BackgroundManager
- BaseFragment
- BaseSupportFragment
- BrandedFragment
- BrandedSupportFragment
- BrowseFragment
- BrowseFragment.BrowseTransitionListener
- BrowseFragment.FragmentFactory
- BrowseFragment.ListRowFragmentFactory
- BrowseFragment.MainFragmentAdapter
- BrowseFragment.MainFragmentAdapterRegistry
- BrowseFragment.MainFragmentRowsAdapter
- BrowseSupportFragment
- BrowseSupportFragment.BrowseTransitionListener
- BrowseSupportFragment.FragmentFactory
- BrowseSupportFragment.ListRowFragmentFactory
- BrowseSupportFragment.MainFragmentAdapter
- BrowseSupportFragment.MainFragmentAdapterRegistry
- BrowseSupportFragment.MainFragmentRowsAdapter
- DetailsFragment
- DetailsFragmentBackgroundController
- DetailsSupportFragment
- DetailsSupportFragmentBackgroundController
- ErrorFragment
- ErrorSupportFragment
- GuidedStepFragment
- GuidedStepSupportFragment
- HeadersFragment
- HeadersSupportFragment
- OnboardingFragment
- OnboardingSupportFragment
- PlaybackFragment
- PlaybackFragmentGlueHost
- PlaybackSupportFragment
- PlaybackSupportFragmentGlueHost
- ProgressBarManager
- RowsFragment
- RowsFragment.MainFragmentAdapter
- RowsFragment.MainFragmentRowsAdapter
- RowsSupportFragment
- RowsSupportFragment.MainFragmentAdapter
- RowsSupportFragment.MainFragmentRowsAdapter
- SearchFragment
- SearchSupportFragment
- VerticalGridFragment
- VerticalGridSupportFragment
- VideoFragment
- VideoFragmentGlueHost
- VideoSupportFragment
- VideoSupportFragmentGlueHost