Flutter Engine
The Flutter Engine
|
Classes | |
interface | DisplayUpdater |
interface | ViewVisitor |
Static Public Member Functions | |
static void | calculateMaximumDisplayMetrics ( @Nullable Context context, @NonNull DisplayUpdater updater) |
static Activity | getActivity (@Nullable Context context) |
static boolean | childHasFocus (@Nullable View root) |
static boolean | hasChildViewOfType (@Nullable View root, Class<? extends View >[] viewTypes) |
static boolean | traverseHierarchy (@Nullable View root, @NonNull ViewVisitor visitor) |
Definition at line 17 of file ViewUtils.java.
|
inlinestatic |
Calculates the maximum display metrics for the given context, and pushes the metric data to the updater.
Definition at line 27 of file ViewUtils.java.
|
inlinestatic |
Determines if the current view or any descendant view has focus.
root | The root view. |
Definition at line 67 of file ViewUtils.java.
|
inlinestatic |
Retrieves the Activity
from a given Context
.
This method will recursively traverse up the context chain if it is a ContextWrapper
until it finds the first instance of the base context that is an Activity
.
Definition at line 47 of file ViewUtils.java.
|
inlinestatic |
Returns true if the root or any child view is an instance of the given types.
root | The root view. |
viewTypes | The types of views. |
Definition at line 78 of file ViewUtils.java.
|
inlinestatic |
Traverses the view hierarchy in pre-order and runs the visitor for each child view including the root view.
If the visitor returns true, the traversal stops, and the method returns true.
If the visitor returns false, the traversal continues until all views are visited.
root | The root view. |
visitor | The visitor. |
Definition at line 109 of file ViewUtils.java.