The Android Developer Challenge is back! Submit your idea before December 2.

BrowseFrameLayout

open class BrowseFrameLayout : FrameLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ androidx.leanback.widget.BrowseFrameLayout

A ViewGroup for managing focus behavior between overlapping views.

Summary

Nested classes

abstract

Interface for managing child focus in a BrowseFrameLayout.

abstract

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

Public constructors

<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyle: Int)

Public methods

open Boolean

open View!
focusSearch(focused: View!, direction: Int)

open BrowseFrameLayout.OnChildFocusListener!

Returns the OnChildFocusListener.

open BrowseFrameLayout.OnFocusSearchListener!

Returns the OnFocusSearchListener.

open Unit
requestChildFocus(child: View!, focused: View!)

open Unit

Sets a OnChildFocusListener.

open Unit

Sets the android.view.View.OnKeyListener on this view.

open Unit

Sets a OnFocusSearchListener.

Protected methods

open Boolean
onRequestFocusInDescendants(direction: Int, previouslyFocusedRect: Rect!)

Public constructors

<init>

BrowseFrameLayout(context: Context!)

<init>

BrowseFrameLayout(context: Context!, attrs: AttributeSet!)

<init>

BrowseFrameLayout(context: Context!, attrs: AttributeSet!, defStyle: Int)

Public methods

dispatchKeyEvent

open fun dispatchKeyEvent(event: KeyEvent!): Boolean

focusSearch

open fun focusSearch(focused: View!, direction: Int): View!

getOnChildFocusListener

open fun getOnChildFocusListener(): BrowseFrameLayout.OnChildFocusListener!

Returns the OnChildFocusListener.

getOnFocusSearchListener

open fun getOnFocusSearchListener(): BrowseFrameLayout.OnFocusSearchListener!

Returns the OnFocusSearchListener.

requestChildFocus

open fun requestChildFocus(child: View!, focused: View!): Unit

setOnChildFocusListener

open fun setOnChildFocusListener(listener: BrowseFrameLayout.OnChildFocusListener!): Unit

Sets a OnChildFocusListener.

setOnDispatchKeyListener

open fun setOnDispatchKeyListener(listener: OnKeyListener!): Unit

Sets the android.view.View.OnKeyListener on this view. This listener would fire only for unhandled KeyEvents. We need to provide an external key listener to handle back button clicks when we are in full screen video mode because View#setOnKeyListener(OnKeyListener) doesn't fire as the focus is not on this view.

setOnFocusSearchListener

open fun setOnFocusSearchListener(listener: BrowseFrameLayout.OnFocusSearchListener!): Unit

Sets a OnFocusSearchListener.

Protected methods

onRequestFocusInDescendants

protected open fun onRequestFocusInDescendants(direction: Int, previouslyFocusedRect: Rect!): Boolean