# BrowseFrameLayout.OnFocusSearchListener

# BrowseFrameLayout.OnFocusSearchListener

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.OnFocusSearchListener)  
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.OnFocusSearchListener "View this page in Java")


```
interface BrowseFrameLayout.OnFocusSearchListener
```

<br />

*** ** * ** ***

Interface for selecting a focused view in a BrowseFrameLayout when the system focus finder couldn't find a view to focus.

## Summary

|                           ### Public functions                            |
|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html)`?` | [onFocusSearch](https://developer.android.com/reference/kotlin/androidx/leanback/widget/BrowseFrameLayout.OnFocusSearchListener#onFocusSearch(android.view.View,int))`(focused: `[View](https://developer.android.com/reference/android/view/View.html)`?, direction: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the view where focus should be requested given the current focused view and the direction of focus search. |

## Public functions

### onFocusSearch

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

```
fun onFocusSearch(focused: View?, direction: Int): View?
```

Returns the view where focus should be requested given the current focused view and the direction of focus search.