# BrowseSupportFragment

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/app/BrowseSupportFragment.java+class:androidx.leanback.app.BrowseSupportFragment) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
class BrowseSupportFragment : BaseSupportFragment
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [androidx.fragment.app.Fragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment) ||||
|   | ↳ | [androidx.leanback.app.BrandedSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment) |||
|   |   | ↳ | [androidx.leanback.app.BaseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment) ||
|   |   |   | ↳ | [androidx.leanback.app.BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment) |

*** ** * ** ***

A fragment for creating Leanback browse screens. It is composed of a RowsSupportFragment and a HeadersSupportFragment.

A BrowseSupportFragment renders the elements of its `https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter` as a set of rows in a vertical list. The elements in this adapter must be subclasses of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row`.

The HeadersSupportFragment can be set to be either shown or hidden by default, or may be disabled entirely. See `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setHeadersState(int)` for details.

By default the BrowseSupportFragment includes support for returning to the headers when the user presses Back. For Activities that customize `https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity#onBackPressed()`, you must disable this default Back key support by calling `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setHeadersTransitionOnBackEnabled(boolean)` with false and use `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.BrowseTransitionListener` and `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#startHeadersTransition(boolean)`.

The recommended theme to use with a BrowseSupportFragment is .

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.BrowseTransitionListener` Listener for transitions between browse headers and rows. |
| `abstract class https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentFactory<T : https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?>` Factory class responsible for creating fragment given the current item. |
| `interface https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentHost` Possible set of actions that `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment` exposes to clients. |
| `class https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.ListRowFragmentFactory : https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentFactory<https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment!>` FragmentFactory implementation for `https://developer.android.com/reference/kotlin/androidx/leanback/widget/ListRow`. |
| `class https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter<T : https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?>` Interface that defines the interaction between `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment` and its main content fragment. |
| `interface https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapterProvider` Interface to be implemented by all fragments for providing an instance of `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter`. |
| `class https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapterRegistry` Registry class maintaining the mapping of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row` subclasses to `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentFactory`. |
| `class https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapter<T : https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?>` This is used to pass information to `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment` or its subclasses. |
| `interface https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapterProvider` Interface to be implemented by `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment` and its subclasses for providing an instance of `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapter`. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_DISABLED() = 3` The headers fragment is disabled and will never be shown. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_ENABLED() = 1` The headers fragment is enabled and shown by default. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_HIDDEN() = 2` The headers fragment is enabled and hidden by default. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#BrowseSupportFragment()()` |

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/android/os/Bundle.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#createArgs(android.os.Bundle,java.lang.String,int)(args: https://developer.android.com/reference/android/os/Bundle.html!, title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, headersState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates arguments for a browse fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#enableMainFragmentScaling(boolean)(enable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables scaling of main fragment when headers are present. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[enableRowScaling](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#enableRowScaling(boolean))(enable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** use `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#enableMainFragmentScaling(boolean)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getAdapter()()` Returns the adapter containing the rows for the fragment. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getBrandColor()()` Returns the brand color for the browse fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getHeadersState()()` Returns the state of the headers column in the browse fragment. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getHeadersSupportFragment()()` Get currently bound HeadersSupportFragment or null if HeadersSupportFragment has not been created yet. |
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getMainFragment()()` |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapterRegistry!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getMainFragmentRegistry()()` |
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewClickedListener!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getOnItemViewClickedListener()()` Returns the item Clicked listener. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewSelectedListener!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getOnItemViewSelectedListener()()` Returns an item selection listener. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getRowsSupportFragment()()` Get RowsSupportFragment if it's bound to BrowseSupportFragment or null if either BrowseSupportFragment has not been created yet or a different fragment is bound to it. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getSelectedPosition()()` Gets position of currently selected row. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/RowPresenter.ViewHolder!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#getSelectedRowViewHolder()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#isHeadersTransitionOnBackEnabled()()` Returns true if headers transition on back key support is enabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#isInHeadersTransition()()` Returns true if the headers transition is currently running. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#isShowingHeaders()()` Returns true if headers are shown. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onCreate(android.os.Bundle)(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)` Called to do initial creation of a fragment. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onCreateHeadersSupportFragment()()` Creates a new `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment` instance. |
| `https://developer.android.com/reference/android/view/View.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)( inflater: https://developer.android.com/reference/android/view/LayoutInflater.html, container: https://developer.android.com/reference/android/view/ViewGroup.html?, savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html? )` Called to have the fragment instantiate its user interface view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onDestroy()()` Called when the fragment is no longer in use. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onDestroyView()()` Called when the view previously created by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` has been detached from the fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onSaveInstanceState(android.os.Bundle)(outState: https://developer.android.com/reference/android/os/Bundle.html)` Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance if its process is restarted. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onStart()()` Called when the Fragment is visible to the user. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onStop()()` Called when the Fragment is no longer started. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setAdapter(androidx.leanback.widget.ObjectAdapter)(adapter: https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter!)` Sets the adapter containing the rows for the fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setBrandColor(int)(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the brand color for the browse fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setBrowseTransitionListener(androidx.leanback.app.BrowseSupportFragment.BrowseTransitionListener)( listener: https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.BrowseTransitionListener! )` Sets a listener for browse fragment transitions. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setHeaderPresenterSelector(androidx.leanback.widget.PresenterSelector)(headerPresenterSelector: https://developer.android.com/reference/kotlin/androidx/leanback/widget/PresenterSelector!)` Sets the `https://developer.android.com/reference/kotlin/androidx/leanback/widget/PresenterSelector` used to render the row headers. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setHeadersState(int)(headersState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the state for the headers column in the browse fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setHeadersTransitionOnBackEnabled(boolean)(headersBackStackEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables/disables headers transition on back key support. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setOnItemViewClickedListener(androidx.leanback.widget.OnItemViewClickedListener)(listener: https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewClickedListener!)` Sets an item clicked listener on the fragment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setOnItemViewSelectedListener(androidx.leanback.widget.OnItemViewSelectedListener)(listener: https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewSelectedListener!)` Sets an item selection listener. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setSelectedPosition(int)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the selected row position with smooth animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setSelectedPosition(int,boolean)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, smooth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the selected row position. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#setSelectedPosition(int,boolean,androidx.leanback.widget.Presenter.ViewHolderTask)( rowPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, smooth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, rowHolderTask: https://developer.android.com/reference/kotlin/androidx/leanback/widget/Presenter.ViewHolderTask! )` Selects a Row and perform an optional task on the Row. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#startHeadersTransition(boolean)(withHeaders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Starts a headers transition. |

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#createEntranceTransition()()` Create entrance transition. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onEntranceTransitionEnd()()` Callback when entrance transition is ended. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onEntranceTransitionPrepare()()` Callback when entrance transition is prepared. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onEntranceTransitionStart()()` Callback when entrance transition is started. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#runEntranceTransition(java.lang.Object)(entranceTransition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` Run entrance transition. |

### Inherited functions

From [androidx.activity.result.ActivityResultCaller](https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller) `abstract https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<I!>!` `<I, O> https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract<I,O>,androidx.activity.result.ActivityResultCallback<O>)(
contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I!, O!>!,
callback: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback<O!>!
)`

Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`.
From [androidx.leanback.app.BaseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment) `https://developer.android.com/reference/kotlin/androidx/leanback/app/ProgressBarManager!` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment#getProgressBarManager()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/leanback/app/ProgressBarManager`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment#onViewCreated(android.view.View,android.os.Bundle)(view: https://developer.android.com/reference/android/view/View.html, savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

Called immediately after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` has returned, but before any saved state has been restored in to the view.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment#prepareEntranceTransition()()`

Enables entrance transition.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment#startEntranceTransition()()`

When fragment finishes loading data, it should call startEntranceTransition() to execute the entrance transition. startEntranceTransition() will start transition only if both two conditions are satisfied:
From [androidx.leanback.app.BrandedSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment) `https://developer.android.com/reference/android/graphics/drawable/Drawable.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#getBadgeDrawable()()`

Returns the badge drawable used in the fragment title.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#getSearchAffordanceColor()()`

Returns the color used to draw the search affordance.
`https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors?` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#getSearchAffordanceColors()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors` used to draw the search affordance.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#getTitle()()`

Returns the title text for the fragment.
`https://developer.android.com/reference/android/view/View.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#getTitleView()()`

Returns the view that implements `https://developer.android.com/reference/kotlin/androidx/leanback/widget/TitleViewAdapter.Provider`.
`https://developer.android.com/reference/kotlin/androidx/leanback/widget/TitleViewAdapter?` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#getTitleViewAdapter()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/leanback/widget/TitleViewAdapter` implemented by title view.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#installTitleView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)(
inflater: https://developer.android.com/reference/android/view/LayoutInflater.html,
parent: https://developer.android.com/reference/android/view/ViewGroup.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

Inflate title view and add to parent.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#isShowingTitle()()`

Returns true/false to indicate the visibility of TitleView.
`https://developer.android.com/reference/android/view/View.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#onInflateTitleView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)(
inflater: https://developer.android.com/reference/android/view/LayoutInflater.html,
parent: https://developer.android.com/reference/android/view/ViewGroup.html?,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

Called by `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#installTitleView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` to inflate title view.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#onPause()()`

Called when the Fragment is no longer resumed.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#onResume()()`

Called when the fragment is visible to the user and actively running.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#setBadgeDrawable(android.graphics.drawable.Drawable)(drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html?)`

Sets the drawable displayed in the fragment title.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#setOnSearchClickedListener(android.view.View.OnClickListener)(listener: https://developer.android.com/reference/android/view/View.OnClickListener.html?)`

Sets a click listener for the search affordance.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#setSearchAffordanceColor(int)(color: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the color used to draw the search affordance.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#setSearchAffordanceColors(androidx.leanback.widget.SearchOrbView.Colors)(colors: https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors)`

Sets the `https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors` used to draw the search affordance.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#setTitle(java.lang.CharSequence)(title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets title text for the fragment.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#setTitleView(android.view.View)(titleView: https://developer.android.com/reference/android/view/View.html?)`

Sets the view that implemented `https://developer.android.com/reference/kotlin/androidx/leanback/widget/TitleViewAdapter`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#showTitle(int)(flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Changes title view's components visibility and shows title.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment#showTitle(boolean)(show: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Shows or hides the title view.
From [android.content.ComponentCallbacks](https://developer.android.com/reference/android/content/ComponentCallbacks.html) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration)(p: https://developer.android.com/reference/android/content/res/Configuration.html!)` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks.html#onLowMemory()()`

**This function is deprecated.**
From [androidx.activity.contextaware.ContextAware](https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener!)`

Add a new `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener` for receiving a callback for when this class is associated with a `https://developer.android.com/reference/android/content/Context.html`.
`abstract https://developer.android.com/reference/android/content/Context.html!` `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#peekAvailableContext()()`

Get the `https://developer.android.com/reference/android/content/Context.html` if it is currently available.
`abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#removeOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener!)`

Remove a `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener` previously added via `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)`.
From [androidx.fragment.app.Fragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener)`

Add a new `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener` for receiving a callback for when this class is associated with a `https://developer.android.com/reference/android/content/Context.html`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])(
prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html,
fd: https://developer.android.com/reference/java/io/FileDescriptor.html?,
writer: https://developer.android.com/reference/java/io/PrintWriter.html,
args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>?
)`

Print the Fragments's state into the given stream.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Subclasses can not override equals().
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getActivity()()`

Return the `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` this fragment is currently associated with.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getAllowEnterTransitionOverlap()()`

Returns whether the the exit transition and enter transition overlap or not.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getAllowReturnTransitionOverlap()()`

Returns whether the the return transition and reenter transition overlap or not.
`https://developer.android.com/reference/android/os/Bundle.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getArguments()()`

Return the arguments supplied when the fragment was instantiated, if any.
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getChildFragmentManager()()`

Return a private FragmentManager for placing and managing Fragments inside of this Fragment.
`https://developer.android.com/reference/android/content/Context.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getContext()()`

Return the `https://developer.android.com/reference/android/content/Context.html` this fragment is currently associated with.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras` `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getDefaultViewModelCreationExtras()()`

The default `https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras` to pass into `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory#create(kotlin.reflect.KClass,androidx.lifecycle.viewmodel.CreationExtras)` when no overriding `https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras` are provided.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getDefaultViewModelProviderFactory()()`

The default `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory` to use when no custom `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory` is provided to the `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getEnterTransition()()`

Returns the Transition that will be used to move Views into the initial scene.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getExitTransition()()`

Returns the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack.
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager?` `[getFragmentManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getFragmentManager())()`

**This function is deprecated.**

This has been removed in favor of `getParentFragmentManager()` which throws an `https://developer.android.com/reference/java/lang/IllegalStateException.html` if the FragmentManager is null.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getHost()()`

Return the host object of this fragment.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getId()()`

Return the identifier this fragment is known by.
`https://developer.android.com/reference/android/view/LayoutInflater.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getLayoutInflater()()`

Returns the cached LayoutInflater used to inflate Views of this Fragment.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getLifecycle()()`

The `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` of this owner.
`https://developer.android.com/reference/kotlin/androidx/loader/app/LoaderManager` `[getLoaderManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getLoaderManager())()`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/loader/app/LoaderManager#getInstance(T)`.

<br />

`https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getParentFragment()()`

Returns the parent Fragment containing this Fragment.
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getParentFragmentManager()()`

Return the FragmentManager for interacting with fragments associated with this fragment's activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getReenterTransition()()`

Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack.
`https://developer.android.com/reference/android/content/res/Resources.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getResources()()`

Return `requireActivity().getResources()`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getRetainInstance](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getRetainInstance())()`

**This function is deprecated.**

Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getReturnTransition()()`

Returns the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack.
`https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getSavedStateRegistry()()`

The `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry` owned by this `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getSharedElementEnterTransition()()`

Returns the Transition that will be used for shared elements transferred into the content Scene.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getSharedElementReturnTransition()()`

Return the Transition that will be used for shared elements transferred back during a pop of the back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getString(int)(resId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Return a localized string from the application's package's default string table.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getString(int,java.lang.Object...)(resId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, formatArgs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>?)`

Return a localized formatted string from the application's package's default string table, substituting the format arguments as defined in `https://developer.android.com/reference/java/util/Formatter.html` and `https://developer.android.com/reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getTag()()`

Get the tag name of the fragment, if specified.
`https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?` `[getTargetFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getTargetFragment())()`

**This function is deprecated.**

Instead of using a target fragment to pass results, use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResult(java.lang.String,android.os.Bundle)` to deliver results to `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentResultListener` instances registered by other fragments via `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getTargetRequestCode](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getTargetRequestCode())()`

**This function is deprecated.**

When using the target fragment replacement of `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResult(java.lang.String,android.os.Bundle)`, consider using `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setArguments(android.os.Bundle)` to pass a `requestKey` if you need to support dynamic request keys.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getText(int)(resId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Return a localized, styled CharSequence from the application's package's default string table.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getUserVisibleHint](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getUserVisibleHint())()`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentTransaction#setMaxLifecycle(androidx.fragment.app.Fragment,androidx.lifecycle.Lifecycle.State)` instead.

<br />

`https://developer.android.com/reference/android/view/View.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getView()()`

Get the root view for the fragment's layout (the one returned by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`), if provided.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewLifecycleOwner()()`

Get a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` that represents the `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getView()` lifecycle.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner!>` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewLifecycleOwnerLiveData()()`

Retrieve a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which allows you to observe the `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewLifecycleOwner()`.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStore` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewModelStore()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStore` associated with this Fragment
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#hashCode()()`

Subclasses can not override hashCode().
`java-static https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `[instantiate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#instantiate(android.content.Context,java.lang.String))(context: https://developer.android.com/reference/android/content/Context.html, fname: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#getFragmentFactory()` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentFactory#instantiate(java.lang.ClassLoader,java.lang.String)`

<br />

`java-static https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `[instantiate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#instantiate(android.content.Context,java.lang.String,android.os.Bundle))(context: https://developer.android.com/reference/android/content/Context.html, fname: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, args: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#getFragmentFactory()` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentFactory#instantiate(java.lang.ClassLoader,java.lang.String)`, manually calling `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setArguments(android.os.Bundle)` on the returned Fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isAdded()()`

Return true if the fragment is currently added to its activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isDetached()()`

Return true if the fragment has been explicitly detached from the UI.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isHidden()()`

Return true if the fragment has been hidden.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isInLayout()()`

Return true if the layout is included as part of an activity view hierarchy via the tag.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isRemoving()()`

Return true if this fragment is currently being removed from its activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isResumed()()`

Return true if the fragment is in the resumed state.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isStateSaved()()`

Returns true if this fragment is added and its state has already been saved by its host.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isVisible()()`

Return true if the fragment is currently visible to the user.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onActivityCreated](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onActivityCreated(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.**

use `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle)` for code touching the view created by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreate(android.os.Bundle)` for other initialization.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onActivityResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onActivityResult(int,int,android.content.Intent))(requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, data: https://developer.android.com/reference/android/content/Intent.html?)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onAttach](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html)`

**This function is deprecated.**

See `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.content.Context)`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html)`

Called when a fragment is first attached to its context.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onAttachFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttachFragment(androidx.fragment.app.Fragment))(childFragment: https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment)`

**This function is deprecated.**

The responsibility for listening for fragments being attached has been moved to FragmentManager.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onConfigurationChanged(android.content.res.Configuration)(newConfig: https://developer.android.com/reference/android/content/res/Configuration.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onContextItemSelected(android.view.MenuItem)(item: https://developer.android.com/reference/android/view/MenuItem.html)`

This hook is called whenever an item in a context menu is selected.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreate(android.os.Bundle)(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

Called to do initial creation of a fragment.
`https://developer.android.com/reference/android/view/animation/Animation.html?` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateAnimation(int,boolean,int)(transit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, enter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, nextAnim: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Called when a fragment loads an animation.
`https://developer.android.com/reference/android/animation/Animator.html?` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateAnimator(int,boolean,int)(transit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, enter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, nextAnim: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Called when a fragment loads an animator.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateContextMenu(android.view.ContextMenu,android.view.View,android.view.ContextMenu.ContextMenuInfo)(
menu: https://developer.android.com/reference/android/view/ContextMenu.html,
v: https://developer.android.com/reference/android/view/View.html,
menuInfo: https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html?
)`

Called when a context menu for the `view` is about to be shown.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onCreateOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater))(menu: https://developer.android.com/reference/android/view/Menu.html, inflater: https://developer.android.com/reference/android/view/MenuInflater.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onDestroyOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroyOptionsMenu())()`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDetach()()`

Called when the fragment is no longer attached to its activity.
`https://developer.android.com/reference/android/view/LayoutInflater.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onGetLayoutInflater(android.os.Bundle)(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

Returns the LayoutInflater used to inflate Views of this Fragment.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onHiddenChanged(boolean)(hidden: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Called when the hidden state (as returned by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isHidden()` of the fragment or another fragment in its hierarchy has changed.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onInflate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onInflate(android.app.Activity,android.util.AttributeSet,android.os.Bundle))(
activity: https://developer.android.com/reference/android/app/Activity.html,
attrs: https://developer.android.com/reference/android/util/AttributeSet.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

**This function is deprecated.**

See `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle)`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle)(
context: https://developer.android.com/reference/android/content/Context.html,
attrs: https://developer.android.com/reference/android/util/AttributeSet.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

Called when a fragment is being created as part of a view layout inflation, typically from setting the content view of an activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onLowMemory()()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onMultiWindowModeChanged(boolean)(isInMultiWindowMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Called when the Fragment's activity changes from fullscreen mode to multi-window mode and visa-versa.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onOptionsItemSelected](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onOptionsItemSelected(android.view.MenuItem))(item: https://developer.android.com/reference/android/view/MenuItem.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onOptionsMenuClosed](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onOptionsMenuClosed(android.view.Menu))(menu: https://developer.android.com/reference/android/view/Menu.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onPictureInPictureModeChanged(boolean)(isInPictureInPictureMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Called by the system when the activity changes to and from picture-in-picture mode.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onPrepareOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onPrepareOptionsMenu(android.view.Menu))(menu: https://developer.android.com/reference/android/view/Menu.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onPrimaryNavigationFragmentChanged(boolean)(
isPrimaryNavigationFragment: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html
)`

Callback for when the primary navigation state of this Fragment has changed.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onRequestPermissionsResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onRequestPermissionsResult(int,java.lang.String[],int[]))(
requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>,
grantResults: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>
)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewStateRestored(android.os.Bundle)(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

Called when all saved state has been restored into the view hierarchy of the fragment.
`https://developer.android.com/reference/android/content/Context.html?` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#peekAvailableContext()()`

Get the `https://developer.android.com/reference/android/content/Context.html` if it is currently available.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#postponeEnterTransition()()`

Postpone the entering Fragment transition until `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startPostponedEnterTransition()` or `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#executePendingTransactions()` has been called.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#postponeEnterTransition(long,java.util.concurrent.TimeUnit)(duration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, timeUnit: https://developer.android.com/reference/java/util/concurrent/TimeUnit.html)`

Postpone the entering Fragment transition for a given amount of time and then call `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startPostponedEnterTransition()`.
`https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<I!>` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
<I, O> https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract<I,O>,androidx.activity.result.ActivityResultCallback<O>)(
contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I!, O!>,
callback: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback<O!>
)`


Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`.

<br />

`https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<I!>` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
<I, O> https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract<I,O>,androidx.activity.result.ActivityResultRegistry,androidx.activity.result.ActivityResultCallback<O>)(
contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I!, O!>,
registry: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistry,
callback: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback<O!>
)`

Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#registerForContextMenu(android.view.View)(view: https://developer.android.com/reference/android/view/View.html)`

Registers a context menu to be shown for the given view (multiple views can show the context menu).
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#removeOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener)`

Remove a `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener` previously added via `https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[requestPermissions](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requestPermissions(java.lang.String[],int))(permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireActivity()()`

Return the `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` this fragment is currently associated with.
`https://developer.android.com/reference/android/os/Bundle.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireArguments()()`

Return the arguments supplied when the fragment was instantiated.
`https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireContext()()`

Return the `https://developer.android.com/reference/android/content/Context.html` this fragment is currently associated with.
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager` `[requireFragmentManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireFragmentManager())()`

**This function is deprecated.**

This has been renamed to `getParentFragmentManager()` to make it clear that you are accessing the FragmentManager that contains this Fragment and not the FragmentManager associated with child Fragments.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireHost()()`

Return the host object of this fragment.
`https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireParentFragment()()`

Returns the parent Fragment containing this Fragment.
`https://developer.android.com/reference/android/view/View.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireView()()`

Get the root view for the fragment's layout (the one returned by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`).
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setAllowEnterTransitionOverlap(boolean)(allow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Sets whether the the exit transition and enter transition overlap or not.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setAllowReturnTransitionOverlap(boolean)(allow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Sets whether the the return transition and reenter transition overlap or not.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setArguments(android.os.Bundle)(args: https://developer.android.com/reference/android/os/Bundle.html?)`

Supply the construction arguments for this fragment.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setEnterSharedElementCallback(androidx.core.app.SharedElementCallback)(callback: https://developer.android.com/reference/kotlin/androidx/core/app/SharedElementCallback?)`

When custom transitions are used with Fragments, the enter transition callback is called when this Fragment is attached or detached when not popping the back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setEnterTransition(java.lang.Object)(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Sets the Transition that will be used to move Views into the initial scene.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setExitSharedElementCallback(androidx.core.app.SharedElementCallback)(callback: https://developer.android.com/reference/kotlin/androidx/core/app/SharedElementCallback?)`

When custom transitions are used with Fragments, the exit transition callback is called when this Fragment is attached or detached when popping the back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setExitTransition(java.lang.Object)(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Sets the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setHasOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setHasOptionsMenu(boolean))(hasMenu: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**

This method is no longer needed when using a `https://developer.android.com/reference/kotlin/androidx/core/view/MenuProvider` to provide a `https://developer.android.com/reference/android/view/Menu.html` to your activity, which replaces `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater)` as the recommended way to provide a consistent, optionally `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`-aware, and modular way to handle menu creation and item selection.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setInitialSavedState(androidx.fragment.app.Fragment.SavedState)(state: https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment.SavedState?)`

Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#saveFragmentInstanceState(androidx.fragment.app.Fragment)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setMenuVisibility(boolean)(menuVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Set a hint for whether this fragment's menu should be visible.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setReenterTransition(java.lang.Object)(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Sets the Transition that will be used to move Views in to the scene when returning due to popping a back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setRetainInstance](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setRetainInstance(boolean))(retain: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**

Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setReturnTransition(java.lang.Object)(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Sets the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setSharedElementEnterTransition(java.lang.Object)(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Sets the Transition that will be used for shared elements transferred into the content Scene.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setSharedElementReturnTransition(java.lang.Object)(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Sets the Transition that will be used for shared elements transferred back during a pop of the back stack.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setTargetFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setTargetFragment(androidx.fragment.app.Fragment,int))(fragment: https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**

Instead of using a target fragment to pass results, the fragment requesting a result should use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)` to register a `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentResultListener` with a `
requestKey` using its `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getParentFragmentManager()`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setUserVisibleHint](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setUserVisibleHint(boolean))(isVisibleToUser: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**

If you are manually calling this method, use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentTransaction#setMaxLifecycle(androidx.fragment.app.Fragment,androidx.lifecycle.Lifecycle.State)` instead.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#shouldShowRequestPermissionRationale(java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

Gets whether you should show UI with rationale before requesting a permission.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivity(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)`

Call `https://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent)` from the fragment's containing Activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivity(android.content.Intent,android.os.Bundle)(intent: https://developer.android.com/reference/android/content/Intent.html, options: https://developer.android.com/reference/android/os/Bundle.html?)`

Call `https://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent, android.os.Bundle)` from the fragment's containing Activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivityForResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivityForResult(android.content.Intent,int))(intent: https://developer.android.com/reference/android/content/Intent.html, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivityForResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivityForResult(android.content.Intent,int,android.os.Bundle))(intent: https://developer.android.com/reference/android/content/Intent.html, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, options: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startIntentSenderForResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startIntentSenderForResult(android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle))(
intent: https://developer.android.com/reference/android/content/IntentSender.html,
requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
fillInIntent: https://developer.android.com/reference/android/content/Intent.html?,
flagsMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
flagsValues: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
extraFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
options: https://developer.android.com/reference/android/os/Bundle.html?
)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startPostponedEnterTransition()()`

Begin postponed transitions after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#postponeEnterTransition()` was called.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#toString()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#unregisterForContextMenu(android.view.View)(view: https://developer.android.com/reference/android/view/View.html)`

Prevents a context menu to be shown for the given view.
From [androidx.lifecycle.HasDefaultViewModelProviderFactory](https://developer.android.com/reference/kotlin/androidx/lifecycle/HasDefaultViewModelProviderFactory) `https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras!` `https://developer.android.com/reference/kotlin/androidx/lifecycle/HasDefaultViewModelProviderFactory#getDefaultViewModelCreationExtras()()`

The default `https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras` to pass into `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory#create(kotlin.reflect.KClass,androidx.lifecycle.viewmodel.CreationExtras)` when no overriding `https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras` are provided.
`https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory!` `https://developer.android.com/reference/kotlin/androidx/lifecycle/HasDefaultViewModelProviderFactory#getDefaultViewModelProviderFactory()()`

The default `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory` to use when no custom `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory` is provided to the `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider`.
From [androidx.lifecycle.LifecycleOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner) `abstract https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle!` `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#getLifecycle()()`

The `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` of this owner.
From [androidx.savedstate.SavedStateRegistryOwner](https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner) `abstract https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry!` `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner#getSavedStateRegistry()()`

The `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry` owned by this `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner`.
From [android.view.View.OnCreateContextMenuListener](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo)(
p: https://developer.android.com/reference/android/view/ContextMenu.html!,
p1: https://developer.android.com/reference/android/view/View.html!,
p2: https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html!
)` From [androidx.lifecycle.ViewModelStoreOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStoreOwner) `abstract https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStore!` `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStoreOwner#getViewModelStore()()`

The owned `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStore`

## Constants

### HEADERS_DISABLED

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
const val HEADERS_DISABLED = 3: Int
```

The headers fragment is disabled and will never be shown.

### HEADERS_ENABLED

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
const val HEADERS_ENABLED = 1: Int
```

The headers fragment is enabled and shown by default.

### HEADERS_HIDDEN

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
const val HEADERS_HIDDEN = 2: Int
```

The headers fragment is enabled and hidden by default.

## Public constructors

### BrowseSupportFragment

Added in 1.1.0

```
BrowseSupportFragment()
```

## Public functions

### createArgs

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
java-static fun createArgs(args: Bundle!, title: String!, headersState: Int): Bundle!
```

Creates arguments for a browse fragment.

| Parameters |
|---|---|
| `args: https://developer.android.com/reference/android/os/Bundle.html!` | The Bundle to place arguments into, or null if the method should return a new Bundle. |
| `title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The title of the BrowseSupportFragment. |
| `headersState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The initial state of the headers of the BrowseSupportFragment. Must be one of `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_ENABLED()`, `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_HIDDEN()`, or `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_DISABLED()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/os/Bundle.html!` | A Bundle with the given arguments for creating a BrowseSupportFragment. |

### enableMainFragmentScaling

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun enableMainFragmentScaling(enable: Boolean): Unit
```

Enables scaling of main fragment when headers are present. For the page/row fragment, scaling is enabled only when both this method and `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter#isScalingEnabled()` are enabled.

| Parameters |
|---|---|
| `enable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true to enable row scaling |

### enableRowScaling

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun [enableRowScaling](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#enableRowScaling(boolean))(enable: Boolean): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#enableMainFragmentScaling(boolean)` instead.

| Parameters |
|---|---|
| `enable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true to enable row scaling |

### getAdapter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getAdapter(): ObjectAdapter!
```

Returns the adapter containing the rows for the fragment.

### getBrandColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getBrandColor(): @ColorInt Int
```

Returns the brand color for the browse fragment. The default is transparent.

### getHeadersState

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getHeadersState(): Int
```

Returns the state of the headers column in the browse fragment.

### getHeadersSupportFragment

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getHeadersSupportFragment(): HeadersSupportFragment!
```

Get currently bound HeadersSupportFragment or null if HeadersSupportFragment has not been created yet.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment!` | Currently bound HeadersSupportFragment or null if HeadersSupportFragment has not been created yet. |

### getMainFragment

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getMainFragment(): Fragment!
```

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment!` | Current main fragment or null if not created. |

### getMainFragmentRegistry

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getMainFragmentRegistry(): BrowseSupportFragment.MainFragmentAdapterRegistry!
```

### getOnItemViewClickedListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getOnItemViewClickedListener(): OnItemViewClickedListener!
```

Returns the item Clicked listener.

### getOnItemViewSelectedListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getOnItemViewSelectedListener(): OnItemViewSelectedListener!
```

Returns an item selection listener.

### getRowsSupportFragment

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getRowsSupportFragment(): RowsSupportFragment!
```

Get RowsSupportFragment if it's bound to BrowseSupportFragment or null if either BrowseSupportFragment has not been created yet or a different fragment is bound to it.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment!` | RowsSupportFragment if it's bound to BrowseSupportFragment or null otherwise. |

### getSelectedPosition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getSelectedPosition(): Int
```

Gets position of currently selected row.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Position of currently selected row. |

### getSelectedRowViewHolder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getSelectedRowViewHolder(): RowPresenter.ViewHolder!
```

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/RowPresenter.ViewHolder!` | selected row ViewHolder inside fragment created by `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapter`. |

### isHeadersTransitionOnBackEnabled

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun isHeadersTransitionOnBackEnabled(): Boolean
```

Returns true if headers transition on back key support is enabled.

### isInHeadersTransition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun isInHeadersTransition(): Boolean
```

Returns true if the headers transition is currently running.

### isShowingHeaders

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun isShowingHeaders(): Boolean
```

Returns true if headers are shown.

### onCreate

```
fun onCreate(savedInstanceState: Bundle!): Unit
```

Called to do initial creation of a fragment. This is called after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.app.Activity)` and before `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`.

Note that this can be called while the fragment's activity is still in the process of being created. As such, you can not rely on things like the activity's content view hierarchy being initialized at this point. If you want to do work once the activity itself is created, add a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleObserver` on the activity's Lifecycle, removing it when it receives the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED` callback.

Any restored child fragments will be created before the base `Fragment.onCreate` method returns.

| Parameters |
|---|---|
| `savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!` | If the fragment is being re-created from a previous saved state, this is the state. |

### onCreateHeadersSupportFragment

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun onCreateHeadersSupportFragment(): HeadersSupportFragment!
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment` instance. Subclass of BrowseSupportFragment may override and return an instance of subclass of HeadersSupportFragment, e.g. when app wants to replace presenter to render HeaderItem.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment!` | A new instance of `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment` or its subclass. |

### onCreateView

```
fun onCreateView(
    inflater: LayoutInflater,
    container: ViewGroup?,
    savedInstanceState: Bundle?
): View?
```

Called to have the fragment instantiate its user interface view. This is optional, and non-graphical fragments can return null. This will be called between `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreate(android.os.Bundle)` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle)`.

A default View can be returned by calling `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#Fragment(int)` in your constructor. Otherwise, this method returns null.

It is recommended to **only** inflate the layout in this method and move logic that operates on the returned View to `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle)`.

If you return a View from here, you will later be called in `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroyView()` when the view is being released.

| Parameters |
|---|---|
| `inflater: https://developer.android.com/reference/android/view/LayoutInflater.html` | The LayoutInflater object that can be used to inflate any views in the fragment, |
| `container: https://developer.android.com/reference/android/view/ViewGroup.html?` | If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view. |
| `savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?` | If non-null, this fragment is being re-constructed from a previous saved state as given here. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/view/View.html?` | Return the View for the fragment's UI, or null. |

### onDestroy

```
fun onDestroy(): Unit
```

Called when the fragment is no longer in use. This is called after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onStop()` and before `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDetach()`.

### onDestroyView

```
fun onDestroyView(): Unit
```

Called when the view previously created by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` has been detached from the fragment. The next time the fragment needs to be displayed, a new view will be created. This is called after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onStop()` and before `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroy()`. It is called *regardless* of whether `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` returned a non-null view. Internally it is called after the view's state has been saved but before it has been removed from its parent.

### onSaveInstanceState

```
fun onSaveInstanceState(outState: Bundle): Unit
```

Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance if its process is restarted. If a new instance of the fragment later needs to be created, the data you place in the Bundle here will be available in the Bundle given to `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreate(android.os.Bundle)`, `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`, and `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle)`.

This corresponds to `https://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)` and most of the discussion there applies here as well. Note however: *this method may be called at any time before `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroy()`*. There are many situations where a fragment may be mostly torn down (such as when placed on the back stack with no UI showing), but its state will not be saved until its owning activity actually needs to save its state.

| Parameters |
|---|---|
| `outState: https://developer.android.com/reference/android/os/Bundle.html` | Bundle in which to place your saved state. |

### onStart

```
fun onStart(): Unit
```

Called when the Fragment is visible to the user. This is generally tied to `https://developer.android.com/reference/android/app/Activity.html#onStart()` of the containing Activity's lifecycle.

### onStop

```
fun onStop(): Unit
```

Called when the Fragment is no longer started. This is generally tied to `https://developer.android.com/reference/android/app/Activity.html#onStop()` of the containing Activity's lifecycle.

### setAdapter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setAdapter(adapter: ObjectAdapter!): Unit
```

Sets the adapter containing the rows for the fragment.

The items referenced by the adapter must be be derived from `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row`. These rows will be used by the rows fragment and the headers fragment (if not disabled) to render the browse rows.

| Parameters |
|---|---|
| `adapter: https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter!` | An ObjectAdapter for the browse rows. All items must derive from `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row`. |

### setBrandColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setBrandColor(color: @ColorInt Int): Unit
```

Sets the brand color for the browse fragment. The brand color is used as the primary color for UI elements in the browse fragment. For example, the background color of the headers fragment uses the brand color.

| Parameters |
|---|---|
| `color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The color to use as the brand color of the fragment. |

### setBrowseTransitionListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setBrowseTransitionListener(
    listener: BrowseSupportFragment.BrowseTransitionListener!
): Unit
```

Sets a listener for browse fragment transitions.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.BrowseTransitionListener!` | The listener to call when a browse headers transition begins or ends. |

### setHeaderPresenterSelector

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setHeaderPresenterSelector(headerPresenterSelector: PresenterSelector!): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/leanback/widget/PresenterSelector` used to render the row headers.

| Parameters |
|---|---|
| `headerPresenterSelector: https://developer.android.com/reference/kotlin/androidx/leanback/widget/PresenterSelector!` | The PresenterSelector that will determine the Presenter for each row header. |

### setHeadersState

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setHeadersState(headersState: Int): Unit
```

Sets the state for the headers column in the browse fragment. Must be one of `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_ENABLED()`, `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_HIDDEN()`, or `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_DISABLED()`.

| Parameters |
|---|---|
| `headersState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The state of the headers for the browse fragment. |

### setHeadersTransitionOnBackEnabled

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setHeadersTransitionOnBackEnabled(headersBackStackEnabled: Boolean): Unit
```

Enables/disables headers transition on back key support. This is enabled by default. The BrowseSupportFragment will add a back stack entry when headers are showing. Running a headers transition when the back key is pressed only works when the headers state is `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_ENABLED()` or `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#HEADERS_HIDDEN()`.

NOTE: If an Activity has its own onBackPressed() handling, you must disable this feature. You may use `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#startHeadersTransition(boolean)` and `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.BrowseTransitionListener` in your own back stack handling.

### setOnItemViewClickedListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setOnItemViewClickedListener(listener: OnItemViewClickedListener!): Unit
```

Sets an item clicked listener on the fragment. OnItemViewClickedListener will override `https://developer.android.com/reference/android/view/View.OnClickListener.html` that item presenter sets during `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Presenter#onCreateViewHolder(android.view.ViewGroup)`. So in general, developer should choose one of the listeners but not both.

### setOnItemViewSelectedListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setOnItemViewSelectedListener(listener: OnItemViewSelectedListener!): Unit
```

Sets an item selection listener.

### setSelectedPosition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setSelectedPosition(position: Int): Unit
```

Sets the selected row position with smooth animation.

### setSelectedPosition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setSelectedPosition(position: Int, smooth: Boolean): Unit
```

Sets the selected row position.

### setSelectedPosition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setSelectedPosition(
    rowPosition: Int,
    smooth: Boolean,
    rowHolderTask: Presenter.ViewHolderTask!
): Unit
```

Selects a Row and perform an optional task on the Row. For example `setSelectedPosition(10, true, new ListRowPresenterSelectItemViewHolderTask(5))` scrolls to 11th row and selects 6th item on that row. The method will be ignored if RowsSupportFragment has not been created (i.e. before `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`).

| Parameters |
|---|---|
| `rowPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Which row to select. |
| `smooth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True to scroll to the row, false for no animation. |
| `rowHolderTask: https://developer.android.com/reference/kotlin/androidx/leanback/widget/Presenter.ViewHolderTask!` | Optional task to perform on the Row. When the task is not null, headers fragment will be collapsed. |

### startHeadersTransition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun startHeadersTransition(withHeaders: Boolean): Unit
```

Starts a headers transition.

This method will begin a transition to either show or hide the headers, depending on the value of withHeaders. If headers are disabled for this browse fragment, this method will throw an exception.

| Parameters |
|---|---|
| `withHeaders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if the headers should transition to being shown, false if the transition should result in headers being hidden. |

## Protected functions

### createEntranceTransition

```
protected fun createEntranceTransition(): Any!
```

Create entrance transition. Subclass can override to load transition from resource or construct manually. Typically app does not need to override the default transition that browse and details provides.

### onEntranceTransitionEnd

```
protected fun onEntranceTransitionEnd(): Unit
```

Callback when entrance transition is ended.

### onEntranceTransitionPrepare

```
protected fun onEntranceTransitionPrepare(): Unit
```

Callback when entrance transition is prepared. This is when fragment should stop user input and animations.

### onEntranceTransitionStart

```
protected fun onEntranceTransitionStart(): Unit
```

Callback when entrance transition is started. This is when fragment should stop processing layout.

### runEntranceTransition

```
protected fun runEntranceTransition(entranceTransition: Any!): Unit
```

Run entrance transition. Subclass may use TransitionManager to perform go(Scene) or beginDelayedTransition(). App should not override the default implementation of browse and details fragment.