pub struct SemanticsCustomAction {
pub label: String,
/* private fields */
}Expand description
A screen-reader action that is not a click, e.g. Compose’s
customActions = listOf(CustomAccessibilityAction("Pause") { … }).
TalkBack surfaces these through its actions menu rather than by activating the node, which is the only way to reach a command that has no on-screen control — pausing a game whose whole surface is one tap-to-launch target.
Fields§
§label: StringWhat the screen reader reads out in its actions menu.
Implementations§
Trait Implementations§
Source§impl Clone for SemanticsCustomAction
impl Clone for SemanticsCustomAction
Source§fn clone(&self) -> SemanticsCustomAction
fn clone(&self) -> SemanticsCustomAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SemanticsCustomAction
impl Debug for SemanticsCustomAction
impl Eq for SemanticsCustomAction
Source§impl PartialEq for SemanticsCustomAction
Two custom actions are the same action when they read the same.
impl PartialEq for SemanticsCustomAction
Two custom actions are the same action when they read the same.
The handler is deliberately excluded. A semantics recorder runs on every
collection, so the closure is a fresh Rc each time and comparing handler
identity would report “the tree changed” on every frame — which on Android
means re-serialising and re-publishing the whole virtual-view tree across
JNI 60 times a second. Handlers are looked up in the live semantics tree at
the moment the action fires (see perform_custom_action), so a handler that
is newer than the last published snapshot is still the one that runs.