# BrowseFrameLayout.OnChildFocusListener

# BrowseFrameLayout.OnChildFocusListener

Artifact:[androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback)  
[View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/BrowseFrameLayout.java+class:androidx.leanback.widget.BrowseFrameLayout.OnChildFocusListener)  
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/widget/BrowseFrameLayout.OnChildFocusListener "View this page in Java")

<br />

```
interface BrowseFrameLayout.OnChildFocusListener
```

<br />

*** ** * ** ***

Interface for managing child focus in a BrowseFrameLayout.

## Summary

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [onRequestChildFocus](https://developer.android.com/reference/kotlin/androidx/leanback/widget/BrowseFrameLayout.OnChildFocusListener#onRequestChildFocus(android.view.View,android.view.View))`(child: `[View](https://developer.android.com/reference/android/view/View.html)`?, focused: `[View](https://developer.android.com/reference/android/view/View.html)`?)` See[requestChildFocus](https://developer.android.com/reference/android/view/ViewGroup.html#requestChildFocus(android.view.View, android.view.View)).                                           |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [onRequestFocusInDescendants](https://developer.android.com/reference/kotlin/androidx/leanback/widget/BrowseFrameLayout.OnChildFocusListener#onRequestFocusInDescendants(int,android.graphics.Rect))`(direction: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, previouslyFocusedRect: `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)`?)` See[onRequestFocusInDescendants](https://developer.android.com/reference/android/view/ViewGroup.html#onRequestFocusInDescendants(int, android.graphics.Rect)). |

## Public functions

### onRequestChildFocus

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

```
fun onRequestChildFocus(child: View?, focused: View?): Unit
```

See[requestChildFocus](https://developer.android.com/reference/android/view/ViewGroup.html#requestChildFocus(android.view.View, android.view.View)).  

### onRequestFocusInDescendants

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

```
fun onRequestFocusInDescendants(direction: Int, previouslyFocusedRect: Rect?): Boolean
```

See[onRequestFocusInDescendants](https://developer.android.com/reference/android/view/ViewGroup.html#onRequestFocusInDescendants(int, android.graphics.Rect)).  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True if handled by listener, otherwise returns[onRequestFocusInDescendants](https://developer.android.com/reference/android/view/ViewGroup.html#onRequestFocusInDescendants(int, android.graphics.Rect)). |