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.
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. |
static
FocusFinder
|
getInstance()
Get the focus finder for this thread. |
Inherited methods | |
|---|---|
java.lang.Object
| |
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 |
| Returns | |
|---|---|
View |
The nearest touchable view, or null if none exists. |
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. |
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. |
FocusFinder getInstance ()
Get the focus finder for this thread.
| Returns | |
|---|---|
FocusFinder |
|