# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# FocusFinder

`public class FocusFinder`
`extends Object` ``

java.lang.Object
↳ | android.view.FocusFinder

The algorithm used for finding the next focusable view in a given direction from a view that currently has focus.

## Summary

### Public methods
`View` | `findNearestTouchable(ViewGroup root, int x, int y, int direction, int[] deltas)` Find the nearest touchable view to the specified view.
`final View` | `findNextFocus(ViewGroup root, View focused, int direction)` Find the next view to take focus in root's descendants, starting from the view that currently is focused.
`View` | `findNextFocusFromRect(ViewGroup root, Rect focusedRect, int direction)` Find the next view to take focus in root's descendants, searching from a particular rectangle in root's coordinates.
`View` | `findNextKeyboardNavigationCluster(View root, View currentCluster, int direction)` Find the root of the next keyboard navigation cluster after the current one.
`static FocusFinder` | `getInstance()` Get the focus finder for this thread.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### findNearestTouchable

    public View findNearestTouchable (ViewGroup root,
                    int x,
                    int y,
                    int direction,
                    int[] deltas)

Find the nearest touchable view to the specified view.

Parameters
`root` | `ViewGroup`: The root of the tree in which to search
`x` | `int`: X coordinate from which to start the search
`y` | `int`: Y coordinate from which to start the search
`direction` | `int`: Direction to look
`deltas` | `int`: Offset from the to the edge of the nearest view. Note that this array may already be populated with values.

Returns
`View` | The nearest touchable view, or null if none exists.

### findNextFocus

    public final View findNextFocus (ViewGroup root,
                    View focused,
                    int direction)

Find the next view to take focus in root's descendants, starting from the view that currently is focused.

Parameters
`root` | `ViewGroup`: Contains focused. Cannot be null.
`focused` | `View`: Has focus now.
`direction` | `int`: Direction to look.

Returns
`View` | The next focusable view, or null if none exists.

### findNextFocusFromRect

    public View findNextFocusFromRect (ViewGroup root,
                    Rect focusedRect,
                    int direction)

Find the next view to take focus in root's descendants, searching from a particular rectangle in root's coordinates.

Parameters
`root` | `ViewGroup`: Contains focusedRect. Cannot be null.
`focusedRect` | `Rect`: The starting point of the search.
`direction` | `int`: Direction to look.

Returns
`View` | The next focusable view, or null if none exists.

### findNextKeyboardNavigationCluster

    public View findNextKeyboardNavigationCluster (View root,
                    View currentCluster,
                    int direction)

Find the root of the next keyboard navigation cluster after the current one.

Parameters
`root` | `View`: The view tree to look inside. Cannot be null This value cannot be `null`.
`currentCluster` | `View`: The starting point of the search. Null means the default cluster This value may be `null`.
`direction` | `int`: Direction to look Value is `View.FOCUS_BACKWARD`, `View.FOCUS_FORWARD`, `View.FOCUS_LEFT`, `View.FOCUS_UP`, `View.FOCUS_RIGHT`, or `View.FOCUS_DOWN`

Returns
`View` | The next cluster, or null if none exists

### getInstance

    public static FocusFinder getInstance ()

Get the focus finder for this thread.

Returns
`FocusFinder` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*