Flutter Engine
The Flutter Engine
|
Public Member Functions | |
AccessibilityNodeInfo | getRootNode ( @NonNull View embeddedView, int flutterId, @NonNull Rect displayBounds) |
AccessibilityNodeInfo | createAccessibilityNodeInfo (int flutterId) |
boolean | requestSendAccessibilityEvent ( @NonNull View embeddedView, @NonNull View eventOrigin, @NonNull AccessibilityEvent event) |
boolean | performAction (int flutterId, int accessibilityAction, @Nullable Bundle arguments) |
Integer | getRecordFlutterId ( @NonNull View embeddedView, @NonNull AccessibilityRecord record) |
boolean | onAccessibilityHoverEvent (int rootFlutterId, @NonNull MotionEvent event) |
View | platformViewOfNode (int flutterId) |
Package Functions | |
AccessibilityViewEmbedder (@NonNull View rootAccessibiiltyView, int firstVirtualNodeId) | |
Facilitates embedding of platform views in the accessibility tree generated by the accessibility bridge.
Embedding is done by mirroring the accessibility tree of the platform view as a subtree of the flutter accessibility tree.
This class relies on hidden system APIs to extract the accessibility information and does not work starting Android P; If the reflection accessors are not available we fail silently by embedding a null node, the app continues working but the accessibility information for the platform view will not be embedded.
We use the term flutterId
for virtual accessibility node IDs in the FlutterView tree, and the term originId
for the virtual accessibility node IDs in the platform view's tree. Internally this class maintains a bidirectional mapping between flutterId
s and the corresponding platform view and originId
.
Definition at line 49 of file AccessibilityViewEmbedder.java.
|
inlinepackage |
Definition at line 71 of file AccessibilityViewEmbedder.java.
|
inline |
Creates the accessibility node info for the node identified with flutterId
.
Definition at line 101 of file AccessibilityViewEmbedder.java.
|
inline |
Returns a flutterID for an accessibility record, or null if no mapping exists.
embeddedView | the embedded view that the record is associated with. |
Definition at line 331 of file AccessibilityViewEmbedder.java.
|
inline |
Returns the root accessibility node for an embedded platform view.
flutterId | the virtual accessibility ID for the node in flutter accessibility tree |
displayBounds | the display bounds for the node in screen coordinates |
Definition at line 86 of file AccessibilityViewEmbedder.java.
|
inline |
Delegates a View::onHoverEvent event from the AccessibilityBridge to an embedded view.
The pointer coordinates are translated to the embedded view's coordinate system.
Definition at line 346 of file AccessibilityViewEmbedder.java.
|
inline |
Delegates anlink AccessibilityNodeProvider::performAction} from the AccessibilityBridge to the embedded view's accessibility node provider.
Definition at line 312 of file AccessibilityViewEmbedder.java.
|
inline |
Returns the View that contains the accessibility node identified by the provided flutterId or null if it doesn't belong to a view.
Definition at line 390 of file AccessibilityViewEmbedder.java.
|
inline |
Delegates an AccessibilityNodeProvider::requestSendAccessibilityEvent from the AccessibilityBridge to the embedded view.
Definition at line 269 of file AccessibilityViewEmbedder.java.