Android APIs
public class

BrowseFrameLayout

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ android.support.v17.leanback.widget.BrowseFrameLayout

Class Overview

A ViewGroup for managing focus behavior between overlapping views.

Summary

Nested Classes
interface BrowseFrameLayout.OnChildFocusListener Interface for managing child focus in a BrowseFrameLayout. 
interface BrowseFrameLayout.OnFocusSearchListener Interface for selecting a focused view in a BrowseFrameLayout when the system focus finder couldn't find a view to focus. 
[Expand]
Inherited XML Attributes
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
BrowseFrameLayout(Context context)
BrowseFrameLayout(Context context, AttributeSet attrs)
BrowseFrameLayout(Context context, AttributeSet attrs, int defStyle)
Public Methods
View focusSearch(View focused, int direction)
Find the nearest view in the specified direction that wants to take focus.
BrowseFrameLayout.OnChildFocusListener getOnChildFocusListener()
BrowseFrameLayout.OnFocusSearchListener getOnFocusSearchListener()
void requestChildFocus(View child, View focused)
Called when a child of this parent wants focus
void setOnChildFocusListener(BrowseFrameLayout.OnChildFocusListener listener)
void setOnFocusSearchListener(BrowseFrameLayout.OnFocusSearchListener listener)
Protected Methods
boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect)
Look for a descendant to call requestFocus() on.
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public BrowseFrameLayout (Context context)

public BrowseFrameLayout (Context context, AttributeSet attrs)

public BrowseFrameLayout (Context context, AttributeSet attrs, int defStyle)

Public Methods

public View focusSearch (View focused, int direction)

Find the nearest view in the specified direction that wants to take focus.

Parameters
focused The view that currently has focus
direction One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT, or 0 for not applicable.

public void requestChildFocus (View child, View focused)

Called when a child of this parent wants focus

Parameters
child The child of this ViewParent that wants focus. This view will contain the focused view. It is not necessarily the view that actually has focus.
focused The view that is a descendant of child that actually has focus

public void setOnChildFocusListener (BrowseFrameLayout.OnChildFocusListener listener)

public void setOnFocusSearchListener (BrowseFrameLayout.OnFocusSearchListener listener)

Protected Methods

protected boolean onRequestFocusInDescendants (int direction, Rect previouslyFocusedRect)

Look for a descendant to call requestFocus() on. Called by requestFocus(int, android.graphics.Rect) when it wants to request focus within its children. Override this to customize how your ViewGroup requests focus within its children.

Parameters
direction One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT
previouslyFocusedRect The rectangle (in this View's coordinate system) to give a finer grained hint about where focus is coming from. May be null if there is no hint.
Returns
  • Whether focus was taken.