# BrowseSupportFragment.FragmentHost

# BrowseSupportFragment.FragmentHost

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.FragmentHost)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/leanback/app/BrowseSupportFragment.FragmentHost "View this page in Java")

<br />

```
interface BrowseSupportFragment.FragmentHost
```

<br />

*** ** * ** ***

Possible set of actions that[BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment)exposes to clients. Custom fragments can interact with[BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment)using this interface.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [notifyDataReady](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentHost#notifyDataReady(androidx.leanback.app.BrowseSupportFragment.MainFragmentAdapter))`(` ` fragmentAdapter: `[BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)`!` `)` Fragments mapped to[PageRow](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PageRow)are required to invoke this callback once their data is created for transition, the entrance animation only after receiving this callback. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [notifyViewCreated](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentHost#notifyViewCreated(androidx.leanback.app.BrowseSupportFragment.MainFragmentAdapter))`(` ` fragmentAdapter: `[BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)`!` `)` Fragments are required to invoke this callback once their view is created inside[onViewCreated](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle))method.            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [showTitleView](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentHost#showTitleView(boolean))`(show: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Show or hide title view in[BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment)for fragments mapped to[PageRow](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PageRow).                                                                                                                                                |

## Public functions

### notifyDataReady

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

```
fun notifyDataReady(
    fragmentAdapter: BrowseSupportFragment.MainFragmentAdapter!
): Unit
```

Fragments mapped to[PageRow](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PageRow)are required to invoke this callback once their data is created for transition, the entrance animation only after receiving this callback. Failure to invoke this method will lead to fragment not showing up.  

|                                                                                    Parameters                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `fragmentAdapter: `[BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)`!` | [MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)used by the current fragment. |

### notifyViewCreated

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

```
fun notifyViewCreated(
    fragmentAdapter: BrowseSupportFragment.MainFragmentAdapter!
): Unit
```

Fragments are required to invoke this callback once their view is created inside[onViewCreated](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle))method.[BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment)starts the entrance animation only after receiving this callback. Failure to invoke this method will lead to fragment not showing up.  

|                                                                                    Parameters                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `fragmentAdapter: `[BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)`!` | [MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)used by the current fragment. |

### showTitleView

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

```
fun showTitleView(show: Boolean): Unit
```

Show or hide title view in[BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment)for fragments mapped to[PageRow](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PageRow). Otherwise the request is ignored, in that case BrowseSupportFragment is fully in control of showing/hiding title view.

When HeadersSupportFragment is visible, BrowseSupportFragment will hide search affordance view if there are other focusable rows above currently focused row.  

|                                         Parameters                                          |
|---------------------------------------------------------------------------------------------|-----------------------------------------------------------|
| `show: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Boolean indicating whether or not to show the title view. |