pub struct LayoutState {Show 114 fields
pub theme_style: AndroidTheme,
pub density: f32,
pub font_scale: f32,
pub dialer_filters: HashMap<String, DialerFilterState>,
pub tab_widget_clicked: HashMap<String, usize>,
pub tab_hosts: HashMap<String, TabHostState>,
pub gallery_clicked: HashMap<String, usize>,
pub sliding_drawers: HashMap<String, SlidingDrawerState>,
pub stack_clicked: HashMap<String, usize>,
pub stack_looping: HashMap<String, bool>,
pub menu_allow_text_with_icon: Option<bool>,
pub grid_default_gap: Option<f32>,
pub video_frames: HashMap<String, Image>,
pub video_dimensions: HashMap<String, (u32, u32)>,
pub video_ready: HashSet<String>,
pub video_controllers: HashMap<String, (String, f32)>,
pub media_players: HashMap<String, MediaPlayerSnapshot>,
pub media_controller_actions: HashMap<String, MediaControllerAction>,
pub media_controller_capabilities: HashMap<String, MediaControllerCapabilities>,
pub quick_contact_targets: HashMap<String, QuickContactTarget>,
pub quick_contact_clicked: HashMap<String, QuickContactTarget>,
pub quick_contact_lookups: HashMap<String, QuickContactLookup>,
pub quick_contact_actions: HashMap<String, QuickContactAction>,
pub rtl: bool,
pub table_collapsed: HashMap<(u64, usize), bool>,
pub text: HashMap<String, String>,
pub input_types: HashMap<String, u8>,
pub calendars: HashMap<String, CalendarState>,
pub number_pickers: HashMap<String, NumberPickerState>,
pub date_spinners: HashMap<String, DateSpinnerState>,
pub time_spinners: HashMap<String, TimeSpinnerState>,
pub expandable_lists: HashMap<String, ExpandableListState>,
pub expandable_events: HashMap<String, ExpandableEvent>,
pub toolbar_navigation_clicked: HashSet<String>,
pub toolbar_title_colors: HashMap<String, Color>,
pub toolbar_subtitle_colors: HashMap<String, Color>,
pub toolbar_menu_items: HashMap<String, Vec<AndroidToolbarMenuItem>>,
pub toolbar_menu_clicked: HashMap<String, u64>,
pub expandable_intercepted_groups: HashMap<String, HashSet<u64>>,
pub expandable_group_clicked: HashMap<String, usize>,
pub expandable_control_events: HashMap<String, (FlatPosition, &'static str)>,
pub search_open: HashMap<String, bool>,
pub search_submit_enabled: HashSet<String>,
pub search_submitted: HashMap<String, String>,
pub search_suggestion_clicked: HashMap<String, usize>,
pub search_suggestion_threshold: HashMap<String, usize>,
pub time_clocks: HashMap<String, TimeClockState>,
pub time_clock_text_mode: HashSet<String>,
pub number_picker_editing: HashSet<String>,
pub calendar_locale: CalendarLocale,
pub text_selection_end: HashMap<String, usize>,
pub comma_tokenizers: HashSet<String>,
pub autocomplete_selected: HashMap<String, usize>,
pub images: HashMap<String, Image>,
pub image_scales: HashMap<String, f32>,
pub image_matrices: HashMap<String, [f32; 4]>,
pub drawable_tints: HashMap<String, AndroidDrawableTint>,
pub image_sources: HashMap<String, String>,
pub view_selected: HashMap<String, bool>,
pub view_activated: HashMap<String, bool>,
pub view_dragged: HashMap<String, bool>,
pub zoom_holds: HashMap<u64, (f64, bool, bool)>,
pub zoom_speed_ms: HashMap<String, u64>,
pub zoom_controls_enabled: HashMap<String, [bool; 2]>,
pub zoom_controls_actions: HashMap<String, i8>,
pub zoom_controls_fades: HashMap<String, ZoomControlsFade>,
pub checked: HashMap<String, bool>,
pub spinner_items: HashMap<String, Vec<String>>,
pub spinner_selected: HashMap<String, usize>,
pub spinner_item_ids: HashMap<String, Vec<i64>>,
pub spinner_enabled: HashMap<String, Vec<bool>>,
pub list_items: HashMap<String, Vec<String>>,
pub list_item_ids: HashMap<String, Vec<i64>>,
pub list_checked: HashMap<String, Vec<usize>>,
pub list_control_clicked: HashMap<String, (usize, &'static str)>,
pub list_clicked: HashMap<String, usize>,
pub list_long_click_enabled: HashMap<String, bool>,
pub list_long_clicked: HashMap<String, usize>,
pub list_enabled: HashMap<String, Vec<bool>>,
pub list_fixed_clicked: HashMap<String, (bool, usize)>,
pub list_fixed_control_clicked: HashMap<String, (bool, usize, &'static str)>,
pub spinner_open: Option<String>,
pub radio_groups: HashMap<u64, Option<u64>>,
pub progress: HashMap<String, f32>,
pub secondary_progress: HashMap<String, f32>,
pub ratings: HashMap<String, f32>,
pub offsets: HashMap<String, f32>,
pub displayed_children: HashMap<String, usize>,
pub transitions: HashMap<u64, ViewTransition>,
pub flipper_running: HashMap<String, bool>,
pub adapter_flipper_clicked: HashMap<String, usize>,
pub adapter_flipper_host_advanced: HashSet<String>,
pub flipper_clocks: HashMap<u64, FlipperClock>,
pub chronometers: HashMap<String, ChronometerState>,
pub wall_clock: Option<WallClock>,
pub visibility: HashMap<String, Visibility>,
pub selected_index: HashMap<String, usize>,
pub nav_badges: HashMap<String, String>,
pub refreshing: HashMap<String, bool>,
pub drawer_open: HashMap<String, bool>,
pub drawer_lock_mode: HashMap<String, u8>,
pub range_values: HashMap<String, [f32; 2]>,
pub sheet_state: HashMap<String, u8>,
pub entries: HashMap<String, Vec<String>>,
pub tab_pager_links: HashMap<String, String>,
pub view_alpha: HashMap<String, f32>,
pub view_scale: HashMap<String, [f32; 2]>,
pub view_translation: HashMap<String, [f32; 2]>,
pub placeholder_content: HashMap<String, String>,
pub drawable_level: HashMap<String, u32>,
pub drawable_transition_active: HashMap<String, bool>,
pub fab_extended: HashMap<String, bool>,
pub last_clicked_link: Option<String>,
pub list_perf: ListPerfStats,
/* private fields */
}Fields§
§theme_style: AndroidThemeActive Android Material / Material 3 theme preset; defaults to AndroidTheme::Bhoo.
density: f32Runtime display density multiplier (dp -> logical px). Defaults to 1.0.
font_scale: f32Runtime font scale multiplier (sp = dp * font_scale). Defaults to 1.0.
dialer_filters: HashMap<String, DialerFilterState>§tab_widget_clicked: HashMap<String, usize>§tab_hosts: HashMap<String, TabHostState>§gallery_clicked: HashMap<String, usize>§sliding_drawers: HashMap<String, SlidingDrawerState>State for Android SlidingDrawer views, keyed by XML ID.
stack_clicked: HashMap<String, usize>Most recently clicked adapter position in a StackView.
stack_looping: HashMap<String, bool>Runtime loop policy for each StackView. XML defaults to non-looping.
Override the Android screen-configuration policy for labels beside action icons.
grid_default_gap: Option<f32>Host theme’s GridLayout default gap in logical pixels. None uses Android’s 8dp default.
video_frames: HashMap<String, Image>Decoded frames supplied by the host; VideoView does not decode media itself.
video_dimensions: HashMap<String, (u32, u32)>Original source dimensions when different from the decoded frame size.
video_ready: HashSet<String>IDs of videos whose host player is prepared for interaction.
video_controllers: HashMap<String, (String, f32)>Video ID to floating controller ID and height in logical pixels.
media_players: HashMap<String, MediaPlayerSnapshot>§media_controller_actions: HashMap<String, MediaControllerAction>§media_controller_capabilities: HashMap<String, MediaControllerCapabilities>§quick_contact_targets: HashMap<String, QuickContactTarget>Host-provided contact targets; no Android contacts provider is accessed.
quick_contact_clicked: HashMap<String, QuickContactTarget>Last activated target for each QuickContactBadge.
quick_contact_lookups: HashMap<String, QuickContactLookup>§quick_contact_actions: HashMap<String, QuickContactAction>§rtl: boolLayout direction for relative FrameLayout start/end gravity.
table_collapsed: HashMap<(u64, usize), bool>Per-table overrides for Android TableLayout.setColumnCollapsed.
text: HashMap<String, String>§input_types: HashMap<String, u8>§calendars: HashMap<String, CalendarState>Calendar widget state keyed by Android view ID.
number_pickers: HashMap<String, NumberPickerState>NumberPicker values and displayed labels supplied by the host.
date_spinners: HashMap<String, DateSpinnerState>§time_spinners: HashMap<String, TimeSpinnerState>§expandable_lists: HashMap<String, ExpandableListState>Expanded state, submit-button policy and last submitted query per SearchView ID. Caller-supplied groups and most recent user event for each expandable list.
expandable_events: HashMap<String, ExpandableEvent>Most recent Toolbar navigation action, keyed by XML view ID.
toolbar_title_colors: HashMap<String, Color>§toolbar_subtitle_colors: HashMap<String, Color>Toolbar menu entries supplied by the host, in display order.
The ID of the last activated menu item for each toolbar.
expandable_intercepted_groups: HashMap<String, HashSet<u64>>Group IDs whose clicks are handled by the host before expansion.
expandable_group_clicked: HashMap<String, usize>Most recent group position clicked, including intercepted clicks.
expandable_control_events: HashMap<String, (FlatPosition, &'static str)>Last XML control activated within an expandable row.
search_open: HashMap<String, bool>§search_submit_enabled: HashSet<String>§search_submitted: HashMap<String, String>§search_suggestion_clicked: HashMap<String, usize>Last activated local suggestion index for each SearchView.
search_suggestion_threshold: HashMap<String, usize>Minimum query length before showing local suggestions; defaults to one.
time_clocks: HashMap<String, TimeClockState>§time_clock_text_mode: HashSet<String>§number_picker_editing: HashSet<String>Fields currently showing the host text editor.
calendar_locale: CalendarLocaleLocalized Gregorian labels and default week start, supplied by the host.
text_selection_end: HashMap<String, usize>UTF-16 selection end supplied by the host text editor.
comma_tokenizers: HashSet<String>Fields configured by the host with Android’s comma tokenizer.
autocomplete_selected: HashMap<String, usize>Most recently selected suggestion index, keyed by field ID.
images: HashMap<String, Image>Decoded drawable images supplied by the application, keyed by resource name.
image_scales: HashMap<String, f32>Source pixel size in density-independent units per drawable.
image_matrices: HashMap<String, [f32; 4]>Axis-aligned matrix scale and translation (sx, sy, tx, ty), keyed by view ID.
drawable_tints: HashMap<String, AndroidDrawableTint>§image_sources: HashMap<String, String>Runtime drawable-name overrides by ImageView ID.
view_selected: HashMap<String, bool>Application-owned selected and activated state for Android views.
view_activated: HashMap<String, bool>§view_dragged: HashMap<String, bool>Caller-owned MaterialCardView dragged states, keyed by XML ID.
zoom_holds: HashMap<u64, (f64, bool, bool)>Per-view long-press repeat deadline and whether repetition started.
zoom_speed_ms: HashMap<String, u64>ZoomButton repeat intervals in milliseconds, keyed by XML view ID. The default is 1000 ms; zero is limited to 1 ms to avoid a busy loop.
zoom_controls_enabled: HashMap<String, [bool; 2]>Per-control enabled state for the zoom-out and zoom-in buttons.
zoom_controls_actions: HashMap<String, i8>Most recent action for a rendered ZoomControls: -1 out or 1 in.
zoom_controls_fades: HashMap<String, ZoomControlsFade>§checked: HashMap<String, bool>§spinner_items: HashMap<String, Vec<String>>Adapter entries and selected index for Android Spinner views.
spinner_selected: HashMap<String, usize>§spinner_item_ids: HashMap<String, Vec<i64>>Optional stable IDs supplied alongside adapter entries.
spinner_enabled: HashMap<String, Vec<bool>>Optional per-item enabled flags; missing positions are enabled.
list_items: HashMap<String, Vec<String>>Host-supplied ListView adapter labels, checked indices, and last click.
list_item_ids: HashMap<String, Vec<i64>>Optional unique stable IDs corresponding to ListView adapter items.
list_checked: HashMap<String, Vec<usize>>§list_control_clicked: HashMap<String, (usize, &'static str)>Most recent ListView child-control activation, as adapter position and XML view ID.
list_clicked: HashMap<String, usize>§list_long_click_enabled: HashMap<String, bool>Enable and retrieve handled item long presses by ListView ID.
list_long_clicked: HashMap<String, usize>§list_enabled: HashMap<String, Vec<bool>>Missing item enabled flags default to true.
list_fixed_clicked: HashMap<String, (bool, usize)>Most recent selectable fixed-view click: (is_footer, index within that group).
list_fixed_control_clicked: HashMap<String, (bool, usize, &'static str)>Most recent control activation in a fixed view: footer flag, view index, XML ID.
spinner_open: Option<String>§radio_groups: HashMap<u64, Option<u64>>§progress: HashMap<String, f32>§secondary_progress: HashMap<String, f32>§ratings: HashMap<String, f32>§offsets: HashMap<String, f32>§displayed_children: HashMap<String, usize>Displayed child index for ViewAnimator and ViewSwitcher, keyed by view ID.
transitions: HashMap<u64, ViewTransition>§flipper_running: HashMap<String, bool>§adapter_flipper_clicked: HashMap<String, usize>Most recent clicked adapter position for an AdapterViewFlipper.
adapter_flipper_host_advanced: HashSet<String>Flippers advanced by their host rather than by their own timer.
flipper_clocks: HashMap<u64, FlipperClock>§chronometers: HashMap<String, ChronometerState>§wall_clock: Option<WallClock>Wall-clock snapshot supplied by the host, including local UTC offset.
visibility: HashMap<String, Visibility>Runtime overrides for views with Android IDs.
selected_index: HashMap<String, usize>Selected destination index for RULE_NAV_BAR containers (bar/rail/drawer), keyed by XML ID.
Runtime badges for RULE_NAV_BAR destinations (bar/rail), keyed by nav item XML ID.
Empty string "" renders a 6dp circular dot badge; non-empty text renders a 16dp pill badge.
refreshing: HashMap<String, bool>Refreshing state for RULE_SWIPE_REFRESH (SwipeRefreshLayout) containers, keyed by XML ID.
drawer_open: HashMap<String, bool>Open state for RULE_DRAWER_LAYOUT (DrawerLayout) containers, keyed by XML ID.
drawer_lock_mode: HashMap<String, u8>Lock mode for RULE_DRAWER_LAYOUT (DrawerLayout) drawers, keyed by "{id}" (start) and "{id}:end" (end).
Values: 0 = UNLOCKED, 1 = LOCKED_CLOSED, 2 = LOCKED_OPEN, 3 = UNDEFINED.
range_values: HashMap<String, [f32; 2]>Two-thumb values [start, end] for RULE_RANGE_SLIDER (RangeSlider) views, keyed by XML ID.
sheet_state: HashMap<String, u8>Sheet state for RULE_BOTTOM_SHEET / RULE_SIDE_SHEET views, keyed by XML ID
(SHEET_STATE_EXPANDED=3, SHEET_STATE_COLLAPSED=4, SHEET_STATE_HIDDEN=5, SHEET_STATE_HALF_EXPANDED=6).
entries: HashMap<String, Vec<String>>Exposed dropdown menu entries for TextInputLayout (end_icon == "dropdown_menu"), keyed by child Edit ID.
tab_pager_links: HashMap<String, String>Two-way synchronization links between TabWidget (TabLayout) and RULE_VIEW_PAGER (ViewPager2) XML IDs.
view_alpha: HashMap<String, f32>Runtime alpha multiplier overrides (0.0..=1.0, matching Android View.setAlpha), keyed by XML ID.
view_scale: HashMap<String, [f32; 2]>Runtime scale overrides [sx, sy] (matching Android View.setScaleX/setScaleY), keyed by XML ID.
view_translation: HashMap<String, [f32; 2]>Runtime translation overrides [tx_dp, ty_dp] (matching Android View.setTranslationX/setTranslationY), keyed by XML ID.
placeholder_content: HashMap<String, String>Dynamic target sibling XML ID override for RULE_CONSTRAINT_PLACEHOLDER views, keyed by placeholder XML ID.
drawable_level: HashMap<String, u32>Runtime drawable level (0..=10000, Android Drawable.setLevel) for RULE_DRAWABLE_DYNAMIC, keyed by XML ID.
drawable_transition_active: HashMap<String, bool>Runtime transition state (false = layer 0, true = layer 1) for RULE_DRAWABLE_DYNAMIC "transition|...", keyed by XML ID.
fab_extended: HashMap<String, bool>Runtime extended/collapsed override for ExtendedFloatingActionButton, keyed by node id.
last_clicked_link: Option<String>Most recently clicked auto-link span text from RULE_TEXT_LINKS_SPANS, overwritten on each link click.
list_perf: ListPerfStatsPerformance and retention counters for Android XML adapter lists.
Implementations§
Source§impl LayoutState
impl LayoutState
Sourcepub fn set_view_camera_distance(&mut self, id: &str, distance: f32) -> bool
pub fn set_view_camera_distance(&mut self, id: &str, distance: f32) -> bool
Set a View camera distance using Android’s View.setCameraDistance
units. Negative values are accepted as their absolute magnitude.
Zero and non-finite distances cannot produce a finite projection.
Sourcepub fn view_camera_distance(&self, id: &str) -> f32
pub fn view_camera_distance(&self, id: &str) -> f32
Return the camera distance in Android View units at the current density.
Sourcepub fn reset_view_camera_distance(&mut self, id: &str)
pub fn reset_view_camera_distance(&mut self, id: &str)
Restore the default Skia camera distance for a View.
Source§impl LayoutState
impl LayoutState
Sourcepub fn install_motion_scene(&mut self, id: &'static str, scene: MotionScene)
pub fn install_motion_scene(&mut self, id: &'static str, scene: MotionScene)
Register the generated scene for a MotionLayout’s XML ID.
Sourcepub fn install_motion_transitions(
&mut self,
id: &'static str,
transitions: &'static [MotionTransition],
)
pub fn install_motion_transitions( &mut self, id: &'static str, transitions: &'static [MotionTransition], )
Install a scene graph in XML order, with its first transition active.
Sourcepub fn set_motion_scene_default_duration(
&mut self,
scene: &str,
milliseconds: i32,
) -> bool
pub fn set_motion_scene_default_duration( &mut self, scene: &str, milliseconds: i32, ) -> bool
Set MotionScene’s default transition duration in milliseconds.
Sourcepub fn install_motion_transition_template(
&mut self,
scene: &str,
destination: Option<&'static str>,
edge: usize,
) -> bool
pub fn install_motion_transition_template( &mut self, scene: &str, destination: Option<&'static str>, edge: usize, ) -> bool
Register an installed edge as a template for lazily generated edges.
Sourcepub fn set_motion_layout_policy(
&mut self,
scene: &str,
edge: Option<usize>,
policy: MotionLayoutPolicy,
) -> bool
pub fn set_motion_layout_policy( &mut self, scene: &str, edge: Option<usize>, policy: MotionLayoutPolicy, ) -> bool
Configure layout-request handling for a scene or one transition index.
Sourcepub fn motion_custom_value(
&self,
scene: &str,
target: &str,
name: &str,
) -> Option<MotionCustomValue>
pub fn motion_custom_value( &self, scene: &str, target: &str, name: &str, ) -> Option<MotionCustomValue>
Return the custom XML value sampled on the most recent render.
Sourcepub fn motion_animated_view_progress(
&self,
scene: &str,
target: &str,
) -> Option<f32>
pub fn motion_animated_view_progress( &self, scene: &str, target: &str, ) -> Option<f32>
Return the last sampled native motionProgress value for a child.
Sourcepub fn install_motion_constraint_set_visibility_modes(
&mut self,
scene: &'static str,
name: &'static str,
ignored: &'static [&'static str],
)
pub fn install_motion_constraint_set_visibility_modes( &mut self, scene: &'static str, name: &'static str, ignored: &'static [&'static str], )
Register the children with visibilityMode=“ignore” for a resolved set.
Sourcepub fn clone_motion_constraint_set(
&self,
scene: &str,
name: &str,
) -> Option<MotionConstraintSet>
pub fn clone_motion_constraint_set( &self, scene: &str, name: &str, ) -> Option<MotionConstraintSet>
Clone a named set so it can be edited without changing other scenes.
Sourcepub fn update_motion_constraint_set(
&mut self,
scene: &str,
name: &str,
set: MotionConstraintSet,
) -> bool
pub fn update_motion_constraint_set( &mut self, scene: &str, name: &str, set: MotionConstraintSet, ) -> bool
Replace the geometry and animated visual attributes of an existing named set.
Sourcepub fn insert_motion_constraint_set(
&mut self,
scene: &str,
name: &'static str,
base_state: &str,
set: MotionConstraintSet,
) -> bool
pub fn insert_motion_constraint_set( &mut self, scene: &str, name: &'static str, base_state: &str, set: MotionConstraintSet, ) -> bool
Register a named runtime snapshot using an existing set’s child structure. Selection and transitions can create an implicit edge for the inserted name.
Sourcepub fn animate_motion_constraint_set(
&mut self,
scene: &str,
name: &str,
set: MotionConstraintSet,
duration: f64,
) -> bool
pub fn animate_motion_constraint_set( &mut self, scene: &str, name: &str, set: MotionConstraintSet, duration: f64, ) -> bool
Update a resting named state and animate from its previous constraint set. The duration is in seconds.
pub fn install_motion_view_transitions( &mut self, scene: &'static str, transitions: &'static [MotionViewTransition], )
Sourcepub fn install_motion_view_key_triggers(
&mut self,
scene: &'static str,
transition: &'static str,
triggers: &'static [MotionKeyTrigger],
) -> bool
pub fn install_motion_view_key_triggers( &mut self, scene: &'static str, transition: &'static str, triggers: &'static [MotionKeyTrigger], ) -> bool
Register trigger keys for a ViewTransition after installing its definition.
Sourcepub fn install_motion_view_key_units(
&mut self,
scene: &'static str,
transition: &'static str,
property: MotionProperty,
units: &'static [MotionDimensionUnit],
) -> bool
pub fn install_motion_view_key_units( &mut self, scene: &'static str, transition: &'static str, property: MotionProperty, units: &'static [MotionDimensionUnit], ) -> bool
Preserve the units of native spatial keys in a ViewTransition track.
Sourcepub fn install_motion_view_target_key_units(
&mut self,
scene: &'static str,
transition: &'static str,
target: &'static str,
property: MotionProperty,
units: &'static [MotionDimensionUnit],
) -> bool
pub fn install_motion_view_target_key_units( &mut self, scene: &'static str, transition: &'static str, target: &'static str, property: MotionProperty, units: &'static [MotionDimensionUnit], ) -> bool
Preserve units for one explicit ViewTransition key target (empty means any target).
Sourcepub fn install_motion_abstract_click(
&mut self,
scene: &'static str,
target: &'static str,
destination: &'static str,
)
pub fn install_motion_abstract_click( &mut self, scene: &'static str, target: &'static str, destination: &'static str, )
Register the click target and destination of an abstract MotionScene transition.
Sourcepub fn install_motion_abstract_click_template(
&mut self,
scene: &'static str,
target: &'static str,
edge: usize,
) -> bool
pub fn install_motion_abstract_click_template( &mut self, scene: &'static str, target: &'static str, edge: usize, ) -> bool
Associate an abstract click with its own transition template.
Sourcepub fn install_motion_trigger_edge_group(
&mut self,
scene: &'static str,
edge: usize,
representative: usize,
)
pub fn install_motion_trigger_edge_group( &mut self, scene: &'static str, edge: usize, representative: usize, )
Share key-trigger history between edges instantiated from one abstract transition.
Sourcepub fn install_motion_trigger_key_group(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
index: usize,
representative: usize,
)
pub fn install_motion_trigger_key_group( &mut self, scene: &'static str, edge: usize, pair: usize, index: usize, representative: usize, )
Associate expanded pattern targets with their original shared KeyTrigger.
Sourcepub fn install_motion_trigger_key_order(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
index: usize,
keyset: usize,
pattern: bool,
)
pub fn install_motion_trigger_key_order( &mut self, scene: &'static str, edge: usize, pair: usize, index: usize, keyset: usize, pattern: bool, )
Record the KeyFrameSet and target kind used by AndroidX controller setup.
Sourcepub fn install_motion_trigger_key_identity(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
index: usize,
identity: usize,
)
pub fn install_motion_trigger_key_identity( &mut self, scene: &'static str, edge: usize, pair: usize, index: usize, identity: usize, )
Identify an XML KeyTrigger consistently across responsive scene pairs.
Sourcepub fn install_motion_trigger_key_pattern(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
index: usize,
pattern: &str,
fallback: bool,
) -> bool
pub fn install_motion_trigger_key_pattern( &mut self, scene: &'static str, edge: usize, pair: usize, index: usize, pattern: &str, fallback: bool, ) -> bool
Register a KeyTrigger pattern; fallback is the import-time match if the runtime engine rejects it.
Sourcepub fn rebuild_motion_trigger_targets(&mut self, scene: &str) -> bool
pub fn rebuild_motion_trigger_targets(&mut self, scene: &str) -> bool
Rebuild pattern-based KeyTrigger and KeyPosition targets after changing tags.
Sourcepub fn rebuild_motion_keyframe_targets(&mut self, scene: &str) -> bool
pub fn rebuild_motion_keyframe_targets(&mut self, scene: &str) -> bool
Rebuild pattern-based keyframe targets after changing constraint tags.
Sourcepub fn install_motion_position_key_pattern(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
track: usize,
key: usize,
pattern: &str,
fallback: bool,
) -> bool
pub fn install_motion_position_key_pattern( &mut self, scene: &'static str, edge: usize, pair: usize, track: usize, key: usize, pattern: &str, fallback: bool, ) -> bool
Register a pattern attached to a candidate KeyPosition for an edge.
Sourcepub fn install_motion_position_key_fit(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
track: usize,
key: usize,
keyset: usize,
pattern: bool,
order: usize,
linear: bool,
) -> bool
pub fn install_motion_position_key_fit( &mut self, scene: &'static str, edge: usize, pair: usize, track: usize, key: usize, keyset: usize, pattern: bool, order: usize, linear: bool, ) -> bool
Record curve-fit selection order for an authored KeyPosition.
Sourcepub fn install_motion_property_key_candidate(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
target: &'static str,
property: MotionProperty,
frame: u8,
value: f32,
keyset: usize,
order: usize,
fit: Option<bool>,
pattern: Option<&str>,
fallback: bool,
) -> bool
pub fn install_motion_property_key_candidate( &mut self, scene: &'static str, edge: usize, pair: usize, target: &'static str, property: MotionProperty, frame: u8, value: f32, keyset: usize, order: usize, fit: Option<bool>, pattern: Option<&str>, fallback: bool, ) -> bool
Register a KeyAttribute candidate for pattern-based controller setup.
Sourcepub fn install_motion_property_key_candidate_with_unit(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
target: &'static str,
property: MotionProperty,
frame: u8,
value: f32,
unit: MotionDimensionUnit,
keyset: usize,
order: usize,
fit: Option<bool>,
pattern: Option<&str>,
fallback: bool,
) -> bool
pub fn install_motion_property_key_candidate_with_unit( &mut self, scene: &'static str, edge: usize, pair: usize, target: &'static str, property: MotionProperty, frame: u8, value: f32, unit: MotionDimensionUnit, keyset: usize, order: usize, fit: Option<bool>, pattern: Option<&str>, fallback: bool, ) -> bool
Register a KeyAttribute candidate with its authored spatial unit.
Sourcepub fn install_motion_custom_key_candidate(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
target: &'static str,
name: &'static str,
frame: u8,
value: MotionCustomValue,
keyset: usize,
order: usize,
fit: Option<bool>,
pattern: Option<&str>,
fallback: bool,
seed: bool,
) -> bool
pub fn install_motion_custom_key_candidate( &mut self, scene: &'static str, edge: usize, pair: usize, target: &'static str, name: &'static str, frame: u8, value: MotionCustomValue, keyset: usize, order: usize, fit: Option<bool>, pattern: Option<&str>, fallback: bool, seed: bool, ) -> bool
Register a custom KeyAttribute candidate for pattern-based setup.
Sourcepub fn install_motion_cycle_key_candidate(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
target: &'static str,
property: MotionProperty,
key: MotionCycleKey,
unit: MotionOffsetUnit,
wave: MotionWave,
keyset: usize,
order: usize,
pattern: Option<&str>,
fallback: bool,
) -> bool
pub fn install_motion_cycle_key_candidate( &mut self, scene: &'static str, edge: usize, pair: usize, target: &'static str, property: MotionProperty, key: MotionCycleKey, unit: MotionOffsetUnit, wave: MotionWave, keyset: usize, order: usize, pattern: Option<&str>, fallback: bool, ) -> bool
Register a progress-driven KeyCycle candidate for tag-based setup.
Sourcepub fn install_motion_time_cycle_key_candidate(
&mut self,
scene: &'static str,
edge: usize,
pair: usize,
target: &'static str,
property: MotionProperty,
key: MotionCycleKey,
unit: MotionOffsetUnit,
wave: MotionWave,
keyset: usize,
order: usize,
pattern: Option<&str>,
fallback: bool,
) -> bool
pub fn install_motion_time_cycle_key_candidate( &mut self, scene: &'static str, edge: usize, pair: usize, target: &'static str, property: MotionProperty, key: MotionCycleKey, unit: MotionOffsetUnit, wave: MotionWave, keyset: usize, order: usize, pattern: Option<&str>, fallback: bool, ) -> bool
Register a time-driven KeyTimeCycle candidate for tag-based setup.
Sourcepub fn set_motion_view_target_pattern(
&mut self,
scene: &str,
transition: &str,
pattern: &str,
) -> bool
pub fn set_motion_view_target_pattern( &mut self, scene: &str, transition: &str, pattern: &str, ) -> bool
Register a full-match constraint-tag pattern for a ViewTransition. Returns false for an unsupported pattern or unknown transition.
Sourcepub fn set_motion_constraint_tag(
&mut self,
scene: &str,
child: &str,
tag: Option<&str>,
) -> bool
pub fn set_motion_constraint_tag( &mut self, scene: &str, child: &str, tag: Option<&str>, ) -> bool
Change a direct child’s constraint tag used by ViewTransition patterns.
Register the resolved non-null constraint tags of an XML ConstraintSet.
Sourcepub fn install_motion_constraint_set_pivot_targets(
&mut self,
scene: &'static str,
state: &'static str,
targets: &'static [(&'static str, &'static str)],
)
pub fn install_motion_constraint_set_pivot_targets( &mut self, scene: &'static str, state: &'static str, targets: &'static [(&'static str, &'static str)], )
Register the resolved pivot targets of a named XML ConstraintSet.
Sourcepub fn install_motion_constraint_set_path_rotations(
&mut self,
scene: &'static str,
state: &'static str,
values: &'static [(&'static str, f32)],
)
pub fn install_motion_constraint_set_path_rotations( &mut self, scene: &'static str, state: &'static str, values: &'static [(&'static str, f32)], )
Register path-relative rotation offsets for an XML ConstraintSet.
Sourcepub fn install_motion_constraint_set_progress(
&mut self,
scene: &'static str,
state: &'static str,
values: &'static [(&'static str, f32)],
)
pub fn install_motion_constraint_set_progress( &mut self, scene: &'static str, state: &'static str, values: &'static [(&'static str, f32)], )
Register authored motionProgress endpoint values for a ConstraintSet.
Sourcepub fn install_motion_view_pivot_delta(
&mut self,
scene: &'static str,
transition: &'static str,
target: &'static str,
)
pub fn install_motion_view_pivot_delta( &mut self, scene: &'static str, transition: &'static str, target: &'static str, )
Register a target delta for a named stateful ViewTransition.
Sourcepub fn install_motion_constraint_set_custom(
&mut self,
scene: &'static str,
state: &'static str,
values: &'static [(&'static str, &'static str, MotionCustomValue)],
)
pub fn install_motion_constraint_set_custom( &mut self, scene: &'static str, state: &'static str, values: &'static [(&'static str, &'static str, MotionCustomValue)], )
Register resolved custom values from an XML ConstraintSet.
Sourcepub fn install_motion_view_custom_delta(
&mut self,
scene: &'static str,
transition: &'static str,
values: &'static [(&'static str, MotionCustomValue)],
)
pub fn install_motion_view_custom_delta( &mut self, scene: &'static str, transition: &'static str, values: &'static [(&'static str, MotionCustomValue)], )
Register custom-attribute deltas for a stateful ViewTransition.
Sourcepub fn install_motion_view_native_delta(
&mut self,
scene: &'static str,
transition: &'static str,
values: &[(MotionProperty, f32)],
)
pub fn install_motion_view_native_delta( &mut self, scene: &'static str, transition: &'static str, values: &[(MotionProperty, f32)], )
Register planar transform and depth deltas for a stateful ViewTransition.
Sourcepub fn install_motion_view_bias_delta(
&mut self,
scene: &'static str,
transition: &'static str,
values: &[(bool, f32)],
)
pub fn install_motion_view_bias_delta( &mut self, scene: &'static str, transition: &'static str, values: &[(bool, f32)], )
Register horizontal (true) or vertical (false) bias deltas.
Sourcepub fn install_motion_view_percent_delta(
&mut self,
scene: &'static str,
transition: &'static str,
values: &[(bool, f32)],
)
pub fn install_motion_view_percent_delta( &mut self, scene: &'static str, transition: &'static str, values: &[(bool, f32)], )
Register width (true) or height (false) percentage deltas.
Sourcepub fn install_motion_view_ratio_delta(
&mut self,
scene: &'static str,
transition: &'static str,
value: &'static str,
) -> bool
pub fn install_motion_view_ratio_delta( &mut self, scene: &'static str, transition: &'static str, value: &'static str, ) -> bool
Register a dimension-ratio delta for a named stateful ViewTransition.
Sourcepub fn install_motion_view_size_delta(
&mut self,
scene: &'static str,
transition: &'static str,
values: &[(MotionSizeBound, MotionSizeValue)],
) -> bool
pub fn install_motion_view_size_delta( &mut self, scene: &'static str, transition: &'static str, values: &[(MotionSizeBound, MotionSizeValue)], ) -> bool
Register dimension-limit deltas for a stateful ViewTransition.
Sourcepub fn install_motion_view_native_typed_delta(
&mut self,
scene: &'static str,
transition: &'static str,
values: &[(MotionProperty, MotionNativeValue)],
)
pub fn install_motion_view_native_typed_delta( &mut self, scene: &'static str, transition: &'static str, values: &[(MotionProperty, MotionNativeValue)], )
Register transform deltas with authored dimension units.
Sourcepub fn install_motion_view_constraint_tag_delta(
&mut self,
scene: &'static str,
transition: &'static str,
tag: &'static str,
)
pub fn install_motion_view_constraint_tag_delta( &mut self, scene: &'static str, transition: &'static str, tag: &'static str, )
Register a constraint-tag delta for a named stateful ViewTransition.
Sourcepub fn install_motion_responsive_tag_sets(
&mut self,
scene: &'static str,
state: &'static str,
sets: &'static [&'static str],
)
pub fn install_motion_responsive_tag_sets( &mut self, scene: &'static str, state: &'static str, sets: &'static [&'static str], )
Register the default and variant set IDs for a responsive state.
Attach this layout state to a shared-value registry. Existing values are observable immediately; only subsequent changes notify listeners.
Attach a registry and supply a nonblocking callback to schedule a frame whenever a changed value is queued for this layout.
Dispatch queued registry changes. Rendering calls this automatically.
Publish an integer to the attached registry. By default this is the process-wide registry. Returns the local transitions started.
Sourcepub fn set_motion_view_tag(
&mut self,
scene: &'static str,
child: &'static str,
tag: &'static str,
present: bool,
)
pub fn set_motion_view_tag( &mut self, scene: &'static str, child: &'static str, tag: &'static str, present: bool, )
Set or clear a tag used by MotionLayout ViewTransitions.
pub fn motion_view_has_tag(&self, scene: &str, child: &str, tag: &str) -> bool
Sourcepub fn motion_view_transition_enabled(
&self,
scene: &str,
name: &str,
) -> Option<bool>
pub fn motion_view_transition_enabled( &self, scene: &str, name: &str, ) -> Option<bool>
Return the effective enablement of a named ViewTransition.
Sourcepub fn set_motion_view_transition_enabled(
&mut self,
scene: &str,
name: &str,
enabled: bool,
) -> bool
pub fn set_motion_view_transition_enabled( &mut self, scene: &str, name: &str, enabled: bool, ) -> bool
Override the enablement of a named ViewTransition until its scene is reinstalled.
Sourcepub fn run_motion_view_transition(&mut self, scene: &str, name: &str) -> bool
pub fn run_motion_view_transition(&mut self, scene: &str, name: &str) -> bool
Apply a named ViewTransition to its declared direct children.
Sourcepub fn run_motion_view_transition_on_children(
&mut self,
scene: &str,
name: &str,
children: &[&str],
) -> bool
pub fn run_motion_view_transition_on_children( &mut self, scene: &str, name: &str, children: &[&str], ) -> bool
Apply a named ViewTransition to explicit direct children. The supplied IDs override XML target matching. Tag gates still apply.
Sourcepub fn reset_motion_constraint_set(&mut self, scene: &str, name: &str) -> bool
pub fn reset_motion_constraint_set(&mut self, scene: &str, name: &str) -> bool
Restore the XML definition of a named set.
Sourcepub fn motion_current_state(&self, id: &str) -> Option<&'static str>
pub fn motion_current_state(&self, id: &str) -> Option<&'static str>
The current endpoint constraint set, including spring overshoot beyond it. A temporary replacement reports its internal start before playback and no current state while in flight, as AndroidX does.
Sourcepub fn set_motion_state(&mut self, scene: &str, state: &str) -> bool
pub fn set_motion_state(&mut self, scene: &str, state: &str) -> bool
Immediately place the scene at a named constraint set or responsive state.
Sourcepub fn jump_motion_to_state(&mut self, scene: &str, state: &str) -> bool
pub fn jump_motion_to_state(&mut self, scene: &str, state: &str) -> bool
Jump to a state, retaining the active edge when the state is one of its endpoints. This also cancels playback when called during a transition.
Sourcepub fn select_motion_transition(
&mut self,
id: &str,
transition_id: &str,
) -> bool
pub fn select_motion_transition( &mut self, id: &str, transition_id: &str, ) -> bool
Select an explicit transition by XML ID, keeping a shared end state if present.
Sourcepub fn select_motion_defined_transition(
&mut self,
id: &str,
declared_index: usize,
) -> bool
pub fn select_motion_defined_transition( &mut self, id: &str, declared_index: usize, ) -> bool
Select a declared transition by the order returned by motion_defined_transitions.
Sourcepub fn set_motion_transition_between(
&mut self,
scene: &str,
start: &str,
end: &str,
) -> bool
pub fn set_motion_transition_between( &mut self, scene: &str, start: &str, end: &str, ) -> bool
Select the transition for an ordered pair of known states and seek to its start.
Sourcepub fn set_motion_transition_path_arc(
&mut self,
scene: &str,
arc: Option<MotionPathArc>,
) -> bool
pub fn set_motion_transition_path_arc( &mut self, scene: &str, arc: Option<MotionPathArc>, ) -> bool
Override the active edge’s path arc, or pass None to restore its XML value.
Sourcepub fn motion_transition_duration(&self, scene: &str) -> Option<f64>
pub fn motion_transition_duration(&self, scene: &str) -> Option<f64>
Return the active transition’s effective duration in seconds.
Sourcepub fn set_motion_transition_duration(
&mut self,
scene: &str,
milliseconds: u32,
) -> bool
pub fn set_motion_transition_duration( &mut self, scene: &str, milliseconds: u32, ) -> bool
Override the active transition duration. AndroidX clamps values below 8 ms.
Sourcepub fn motion_transition_definition(
&self,
scene: &str,
name: &str,
) -> Option<MotionTransition>
pub fn motion_transition_definition( &self, scene: &str, name: &str, ) -> Option<MotionTransition>
Return a snapshot of a named transition, including runtime overrides.
Sourcepub fn install_motion_declared_transition_indices(
&mut self,
scene: &str,
indices: &[usize],
) -> bool
pub fn install_motion_declared_transition_indices( &mut self, scene: &str, indices: &[usize], ) -> bool
Identify declared graph edges, excluding edges synthesized from templates.
Sourcepub fn motion_defined_transitions(
&self,
scene: &str,
) -> Option<Vec<MotionTransition>>
pub fn motion_defined_transitions( &self, scene: &str, ) -> Option<Vec<MotionTransition>>
Snapshot declared transitions in declaration order, without generated edges.
Sourcepub fn active_motion_transition(&self, scene: &str) -> Option<&'static str>
pub fn active_motion_transition(&self, scene: &str) -> Option<&'static str>
Return the ID of the active edge, or an empty ID for a generated edge.
Sourcepub fn motion_start_state(&self, scene: &str) -> Option<&'static str>
pub fn motion_start_state(&self, scene: &str) -> Option<&'static str>
Return the active transition’s start state, or None for an unknown captured start.
Sourcepub fn motion_end_state(&self, scene: &str) -> Option<&'static str>
pub fn motion_end_state(&self, scene: &str) -> Option<&'static str>
Return the destination state of the active transition.
Sourcepub fn motion_transition_enabled(&self, scene: &str, name: &str) -> Option<bool>
pub fn motion_transition_enabled(&self, scene: &str, name: &str) -> Option<bool>
Inspect a named transition’s effective input enablement.
Sourcepub fn set_motion_transition_enabled(
&mut self,
scene: &str,
name: &str,
enabled: bool,
) -> bool
pub fn set_motion_transition_enabled( &mut self, scene: &str, name: &str, enabled: bool, ) -> bool
Enable or disable a named transition for user gestures.
Sourcepub fn transition_motion_to_state(
&mut self,
id: &str,
destination: &str,
) -> bool
pub fn transition_motion_to_state( &mut self, id: &str, destination: &str, ) -> bool
Animate toward a named ConstraintSet using the active edge or an exact outgoing edge.
Sourcepub fn transition_motion_to_state_with_duration(
&mut self,
id: &str,
destination: &str,
milliseconds: i32,
) -> bool
pub fn transition_motion_to_state_with_duration( &mut self, id: &str, destination: &str, milliseconds: i32, ) -> bool
Animate to a state with an optional one-run duration in milliseconds. As in AndroidX, nonpositive values use the selected transition’s duration.
Sourcepub fn transition_motion_to_state_with_dimensions(
&mut self,
id: &str,
destination: &str,
width: i32,
height: i32,
milliseconds: i32,
) -> bool
pub fn transition_motion_to_state_with_dimensions( &mut self, id: &str, destination: &str, width: i32, height: i32, milliseconds: i32, ) -> bool
Select a responsive destination using physical-pixel screen dimensions. A width or height of -1 follows AndroidX’s unspecified-size behavior.
Sourcepub fn schedule_motion_transition_to(
&mut self,
id: &str,
destination: &str,
) -> bool
pub fn schedule_motion_transition_to( &mut self, id: &str, destination: &str, ) -> bool
Mirror MotionLayout’s scheduleTransitionTo: queue from a constraint state, or route immediately when the current position is between states.
Sourcepub fn install_motion_variant_units(
&mut self,
scene: &'static str,
state: &'static str,
units: &[[MotionDimensionUnit; 4]],
)
pub fn install_motion_variant_units( &mut self, scene: &'static str, state: &'static str, units: &[[MotionDimensionUnit; 4]], )
Install units for each logical StateSet variant’s four thresholds.
Sourcepub fn set_motion_progress(&mut self, id: &str, progress: f32)
pub fn set_motion_progress(&mut self, id: &str, progress: f32)
Seek to a scene position and stop timed playback. Values outside 0..=1
extrapolate, as AndroidX setProgress permits despite its warning.
Sourcepub fn set_motion_interpolated_progress(
&mut self,
id: &str,
position: f32,
) -> bool
pub fn set_motion_interpolated_progress( &mut self, id: &str, position: f32, ) -> bool
Sample the active scene interpolator once, then seek to that position.
Sourcepub fn set_motion_progress_with_velocity(
&mut self,
id: &str,
progress: f32,
velocity: f32,
) -> bool
pub fn set_motion_progress_with_velocity( &mut self, id: &str, progress: f32, velocity: f32, ) -> bool
Seek and run the active transition toward the endpoint selected by velocity. A zero velocity selects the nearest endpoint, with a tie toward the start.
Sourcepub fn play_motion(&mut self, id: &str, toward_end: bool)
pub fn play_motion(&mut self, id: &str, toward_end: bool)
Play toward the selected endpoint from the last rendered position.
Sourcepub fn animate_motion_progress(&mut self, id: &str, progress: f32) -> bool
pub fn animate_motion_progress(&mut self, id: &str, progress: f32) -> bool
Play toward a finite progress value using the active transition’s timing.
Sourcepub fn set_motion_spring_config(
&mut self,
scene: &str,
edge: usize,
config: MotionSpringConfig,
) -> bool
pub fn set_motion_spring_config( &mut self, scene: &str, edge: usize, config: MotionSpringConfig, ) -> bool
Register spring parameters independently of the OnSwipe auto-completion mode.
Sourcepub fn spring_motion_to(
&mut self,
scene: &str,
target: f32,
velocity: f32,
now: f64,
) -> bool
pub fn spring_motion_to( &mut self, scene: &str, target: f32, velocity: f32, now: f64, ) -> bool
Spring toward a progress value using the active OnSwipe spring configuration.
now uses the same seconds-based clock as the host’s rendered frames.
Sourcepub fn touch_animate_motion_to(
&mut self,
scene: &str,
mode: MotionSwipeRelease,
target: f32,
velocity: f32,
now: f64,
) -> bool
pub fn touch_animate_motion_to( &mut self, scene: &str, mode: MotionSwipeRelease, target: f32, velocity: f32, now: f64, ) -> bool
Start an AndroidX touch-completion profile with an explicit destination.
now uses the same seconds-based clock as the host’s rendered frames.
Sourcepub fn set_motion_intercept_touch_return_swipe(
&mut self,
scene: &str,
edge: usize,
enabled: bool,
) -> bool
pub fn set_motion_intercept_touch_return_swipe( &mut self, scene: &str, edge: usize, enabled: bool, ) -> bool
Set AndroidX’s onInterceptTouchReturnSwipe flag on an installed edge.
Sourcepub fn set_motion_interaction_enabled(
&mut self,
scene: &str,
enabled: bool,
) -> bool
pub fn set_motion_interaction_enabled( &mut self, scene: &str, enabled: bool, ) -> bool
Control whether touch, wheel and XML click triggers can drive the scene.
Sourcepub fn motion_interaction_enabled(&self, scene: &str) -> Option<bool>
pub fn motion_interaction_enabled(&self, scene: &str) -> Option<bool>
Return the current interaction setting for an installed scene.
Sourcepub fn set_motion_auto_transition_enabled(&mut self, id: &str, enabled: bool)
pub fn set_motion_auto_transition_enabled(&mut self, id: &str, enabled: bool)
Control whether the scene automatically leaves matching endpoints.
Sourcepub fn take_motion_transition_events(
&mut self,
) -> VecDeque<MotionTransitionEvent>
pub fn take_motion_transition_events( &mut self, ) -> VecDeque<MotionTransitionEvent>
Drain transition lifecycle events in delivery order.
Sourcepub fn take_motion_trigger_events(&mut self) -> VecDeque<MotionTriggerEvent>
pub fn take_motion_trigger_events(&mut self) -> VecDeque<MotionTriggerEvent>
Drain threshold events. Callback names are data for the application’s dispatcher.
Sourcepub fn motion_velocity(&self, id: &str) -> Option<f32>
pub fn motion_velocity(&self, id: &str) -> Option<f32>
Return the signed change in normalized progress per second on the last rendered frame.
Sourcepub fn motion_release_interpolator_velocity(&self, id: &str) -> Option<f32>
pub fn motion_release_interpolator_velocity(&self, id: &str) -> Option<f32>
Return the last velocity reported by an AndroidX-style release interpolator, or None before one has been sampled or after a seek. SpringStopEngine reports zero here even while its integrator moves.
Sourcepub fn motion_view_layout_velocity(
&self,
id: &str,
child: &str,
point: [f32; 2],
static_velocity: bool,
) -> Option<[f32; 2]>
pub fn motion_view_layout_velocity( &self, id: &str, child: &str, point: [f32; 2], static_velocity: bool, ) -> Option<[f32; 2]>
Return the layout-space velocity at a fractional point in a direct child. Static mode reports logical pixels per unit progress, otherwise per second. Geometry is sampled at the last render.
Sourcepub fn motion_view_post_layout_velocity(
&self,
id: &str,
child: &str,
point: [f32; 2],
static_velocity: bool,
) -> Option<[f32; 2]>
pub fn motion_view_post_layout_velocity( &self, id: &str, child: &str, point: [f32; 2], static_velocity: bool, ) -> Option<[f32; 2]>
Return a child’s point velocity including its sampled view transform. Use fractional coordinates and the same units as motion_view_layout_velocity.
Sourcepub fn motion_target_progress(&self, id: &str) -> Option<f32>
pub fn motion_target_progress(&self, id: &str) -> Option<f32>
Return the active playback destination, or the held position when idle.
Sourcepub fn motion_progress(&self, id: &str) -> f32
pub fn motion_progress(&self, id: &str) -> f32
Return the last sampled progress of the active timeline.
Source§impl LayoutState
impl LayoutState
Sourcepub fn effective_density(&self) -> f32
pub fn effective_density(&self) -> f32
Effective display density multiplier (<= 0.0 or non-finite defaults to 1.0).
Sourcepub fn effective_font_scale(&self) -> f32
pub fn effective_font_scale(&self) -> f32
Effective font scale multiplier (<= 0.0 or non-finite defaults to 1.0).
Sourcepub fn configure_tab_host(
&mut self,
id: &str,
widget_id: &str,
content_ids: Vec<String>,
) -> Result<(), &'static str>
pub fn configure_tab_host( &mut self, id: &str, widget_id: &str, content_ids: Vec<String>, ) -> Result<(), &'static str>
Configure view-ID tabs. XML supplies matching TabWidget children and content views.
Sourcepub fn configure_tab_host_labels(
&mut self,
id: &str,
widget_id: &str,
tabs: Vec<(String, String, String)>,
) -> Result<(), &'static str>
pub fn configure_tab_host_labels( &mut self, id: &str, widget_id: &str, tabs: Vec<(String, String, String)>, ) -> Result<(), &'static str>
Configure label indicators and tags for an empty XML TabWidget.
Sourcepub fn configure_tab_host_factory(
&mut self,
id: &str,
widget_id: &str,
tabs: Vec<(String, String)>,
factory: fn(&str) -> &'static Node,
) -> Result<(), &'static str>
pub fn configure_tab_host_factory( &mut self, id: &str, widget_id: &str, tabs: Vec<(String, String)>, factory: fn(&str) -> &'static Node, ) -> Result<(), &'static str>
Configure lazily created XML content in an empty tabcontent FrameLayout.
Sourcepub fn configure_tab_host_mixed(
&mut self,
id: &str,
widget_id: &str,
tabs: Vec<(String, String, TabHostContent)>,
) -> Result<(), &'static str>
pub fn configure_tab_host_mixed( &mut self, id: &str, widget_id: &str, tabs: Vec<(String, String, TabHostContent)>, ) -> Result<(), &'static str>
Configure label tabs mixing existing XML views and lazy factories.
Sourcepub fn tab_host_created_count(&self, id: &str) -> usize
pub fn tab_host_created_count(&self, id: &str) -> usize
Number of factory-backed tabs created for this host.
Sourcepub fn set_tab_host_by_tag(&mut self, id: &str, tag: &str) -> bool
pub fn set_tab_host_by_tag(&mut self, id: &str, tag: &str) -> bool
Select the first tab with the given tag.
Sourcepub fn set_tab_host_current(&mut self, id: &str, index: usize) -> bool
pub fn set_tab_host_current(&mut self, id: &str, index: usize) -> bool
Select a configured tab; invalid indices leave the current tab unchanged.
Sourcepub fn show_floating_media_controller(
&mut self,
id: &str,
now: f64,
timeout_ms: u64,
)
pub fn show_floating_media_controller( &mut self, id: &str, now: f64, timeout_ms: u64, )
Show a floating controller; timeout zero leaves it visible until hidden.
pub fn hide_floating_media_controller(&mut self, id: &str)
pub fn floating_media_controller_is_showing(&self, id: &str) -> bool
Sourcepub fn assign_quick_contact(
&mut self,
id: &str,
target: Option<QuickContactTarget>,
lazy: bool,
)
pub fn assign_quick_contact( &mut self, id: &str, target: Option<QuickContactTarget>, lazy: bool, )
Assign a contact; non-lazy email or phone assignments request lookup immediately.
Sourcepub fn resolve_quick_contact(
&mut self,
id: &str,
token: u64,
uri: Option<String>,
) -> bool
pub fn resolve_quick_contact( &mut self, id: &str, token: u64, uri: Option<String>, ) -> bool
Complete a host lookup. Stale responses are ignored. None means no contact matched.
Sourcepub fn expand_list_group(
&mut self,
id: &str,
group: usize,
animate: bool,
) -> bool
pub fn expand_list_group( &mut self, id: &str, group: usize, animate: bool, ) -> bool
Expand a group and optionally scroll its children into view, as Android’s expandGroup does.
pub fn collapse_list_group(&mut self, id: &str, group: usize) -> bool
Sourcepub fn set_toolbar_item_checked(
&mut self,
toolbar: &str,
item_id: u64,
checked: bool,
)
pub fn set_toolbar_item_checked( &mut self, toolbar: &str, item_id: u64, checked: bool, )
Apply MenuItem.setChecked; exclusive groups select this item even for false, as Android does.
pub fn set_toolbar_group_checkable( &mut self, toolbar: &str, group_id: u64, checkable: bool, exclusive: bool, )
Sourcepub fn set_toolbar_group_enabled(
&mut self,
toolbar: &str,
group_id: u64,
enabled: bool,
)
pub fn set_toolbar_group_enabled( &mut self, toolbar: &str, group_id: u64, enabled: bool, )
Apply Android Menu.setGroupEnabled to every item with this group ID.
Sourcepub fn set_toolbar_group_visible(
&mut self,
toolbar: &str,
group_id: u64,
visible: bool,
)
pub fn set_toolbar_group_visible( &mut self, toolbar: &str, group_id: u64, visible: bool, )
Apply Android Menu.setGroupVisible to every item with this group ID.
Sourcepub fn set_autocomplete_items(&mut self, id: &str, items: Vec<String>)
pub fn set_autocomplete_items(&mut self, id: &str, items: Vec<String>)
Replace the synchronous ArrayAdapter-style suggestions for an AutoCompleteTextView.
Sourcepub fn take_search_focus_request(&mut self, id: &str) -> bool
pub fn take_search_focus_request(&mut self, id: &str) -> bool
Consume a pending request to focus the host SearchView editor.
Sourcepub fn set_search_query(&mut self, id: &str, text: &str)
pub fn set_search_query(&mut self, id: &str, text: &str)
Set a SearchView query from a host editor and request a change callback.
Sourcepub fn submit_search(&mut self, id: &str) -> bool
pub fn submit_search(&mut self, id: &str) -> bool
Submit a nonblank query; the host receives the original query unchanged.
Sourcepub fn end_number_picker_edit(&mut self, id: &str, commit: bool) -> bool
pub fn end_number_picker_edit(&mut self, id: &str, commit: bool) -> bool
Finish a NumberPicker text edit. Empty input restores the previous value.
Sourcepub fn update_time_clock_input(&mut self, field_id: &str)
pub fn update_time_clock_input(&mut self, field_id: &str)
Apply a host text update to a clock-mode TimePicker field.
pub fn autocomplete_has_highlight(&self, id: &str) -> bool
Sourcepub fn autocomplete_is_open(&self, id: &str) -> bool
pub fn autocomplete_is_open(&self, id: &str) -> bool
Whether the suggestion popup belongs to the given XML field.
Sourcepub fn set_spinner_item_templates(
&mut self,
id: &str,
templates: Option<SpinnerItemTemplates>,
) -> Result<(), &'static str>
pub fn set_spinner_item_templates( &mut self, id: &str, templates: Option<SpinnerItemTemplates>, ) -> Result<(), &'static str>
Set noninteractive XML templates for the selected view and popup rows.
Sourcepub fn set_expandable_item_templates(
&mut self,
id: &str,
group: Option<ListItemTemplate>,
child: Option<ListItemTemplate>,
) -> Result<(), &'static str>
pub fn set_expandable_item_templates( &mut self, id: &str, group: Option<ListItemTemplate>, child: Option<ListItemTemplate>, ) -> Result<(), &'static str>
Bind separate noninteractive Android XML layouts to expandable group and child rows. Template heights are measured as rows become visible.
Sourcepub fn set_expandable_item_binding(
&mut self,
id: &str,
position: FlatPosition,
binding: Option<AdapterItemBinding>,
) -> Result<(), &'static str>
pub fn set_expandable_item_binding( &mut self, id: &str, position: FlatPosition, binding: Option<AdapterItemBinding>, ) -> Result<(), &'static str>
Bind additional text, images, or a template to an expandable row. The binding follows stable group/child IDs when the adapter is reordered.
Sourcepub fn expandable_control_checked(
&self,
id: &str,
group_id: u64,
child_id: Option<u64>,
view_id: &str,
) -> Option<bool>
pub fn expandable_control_checked( &self, id: &str, group_id: u64, child_id: Option<u64>, view_id: &str, ) -> Option<bool>
Read a checked control in a row by stable adapter IDs and XML view ID.
Sourcepub fn adapter_flipper_advance_by_host(&mut self, id: &str)
pub fn adapter_flipper_advance_by_host(&mut self, id: &str)
Match Android’s fyiWillBeAdvancedByHostKThx: stop the internal timer while keeping the requested start/stop state and allowing host advances.
Sourcepub fn adapter_flipper_step(&mut self, id: &str, delta: isize) -> bool
pub fn adapter_flipper_step(&mut self, id: &str, delta: isize) -> bool
Advance an adapter flipper by one or more positions and reset its timer.
Sourcepub fn set_radio_group_checked(&mut self, group: &str, selection: Option<&str>)
pub fn set_radio_group_checked(&mut self, group: &str, selection: Option<&str>)
Request a RadioGroup selection by descendant ID, or clear it with None.
Applied when the group next renders; unknown IDs remain the group’s selection,
as with Android’s check, but do not check a view.
Sourcepub fn take_radio_group_events(&mut self, group: &str) -> Vec<Option<u64>>
pub fn take_radio_group_events(&mut self, group: &str) -> Vec<Option<u64>>
Drain selection notifications. None means cleared; the queue holds the latest 32.
Sourcepub fn set_sliding_drawer_locked(&mut self, id: &str, locked: bool)
pub fn set_sliding_drawer_locked(&mut self, id: &str, locked: bool)
Prevent user gestures on a SlidingDrawer. Programmatic requests still work.
Sourcepub fn set_sliding_drawer_open(&mut self, id: &str, open: bool, animated: bool)
pub fn set_sliding_drawer_open(&mut self, id: &str, open: bool, animated: bool)
Open or close a SlidingDrawer on its next render, with optional animation.
Sourcepub fn take_sliding_drawer_events(
&mut self,
id: &str,
) -> Vec<SlidingDrawerEvent>
pub fn take_sliding_drawer_events( &mut self, id: &str, ) -> Vec<SlidingDrawerEvent>
Drain listener events for this drawer. The queue retains at most 32 events.
Sourcepub fn stack_step(&mut self, id: &str, delta: isize) -> bool
pub fn stack_step(&mut self, id: &str, delta: isize) -> bool
Advance the displayed StackView adapter item, respecting its loop policy.
Sourcepub fn set_list_item_template(
&mut self,
id: &str,
template: Option<ListItemTemplate>,
) -> Result<(), &'static str>
pub fn set_list_item_template( &mut self, id: &str, template: Option<ListItemTemplate>, ) -> Result<(), &'static str>
Bind a ListView row XML template to each adapter label.
Sourcepub fn set_interactive_list_item_template(
&mut self,
id: &str,
template: Option<ListItemTemplate>,
) -> Result<(), &'static str>
pub fn set_interactive_list_item_template( &mut self, id: &str, template: Option<ListItemTemplate>, ) -> Result<(), &'static str>
Install a ListView or GridView item with supported interactive checkbox, switch, or button children.
pub fn list_item_control_checked( &self, id: &str, item_id: i64, view_id: &str, ) -> Option<bool>
Sourcepub fn list_item_text(
&self,
id: &str,
item_id: i64,
view_id: &str,
) -> Option<&str>
pub fn list_item_text( &self, id: &str, item_id: i64, view_id: &str, ) -> Option<&str>
Read the current text of an EditText inside an interactive list item, falling back to
its bound or XML default text when no modified state is selectively retained.
Sourcepub fn set_list_item_text(
&mut self,
id: &str,
item_id: i64,
view_id: &str,
text: Option<String>,
)
pub fn set_list_item_text( &mut self, id: &str, item_id: i64, view_id: &str, text: Option<String>, )
Update or clear selective retained text for an EditText inside an interactive list item.
Entries matching the item’s default text are released to keep retained state bounded.
Sourcepub fn reset_list_perf(&mut self)
pub fn reset_list_perf(&mut self)
Reset accumulated list performance counters.
Sourcepub fn list_retained_stats(&self, id: &str) -> (usize, usize, usize)
pub fn list_retained_stats(&self, id: &str) -> (usize, usize, usize)
Exact retained cache/control rows and estimated heap bytes for one list ID.
pub fn list_fixed_control_checked( &self, id: &str, footer: bool, index: usize, view_id: &str, ) -> Option<bool>
Sourcepub fn set_list_item_binding(
&mut self,
id: &str,
index: usize,
binding: Option<AdapterItemBinding>,
) -> Result<(), &'static str>
pub fn set_list_item_binding( &mut self, id: &str, index: usize, binding: Option<AdapterItemBinding>, ) -> Result<(), &'static str>
Set or remove additional bindings for one adapter position.
Sourcepub fn set_interactive_list_item_binding(
&mut self,
id: &str,
index: usize,
binding: Option<AdapterItemBinding>,
) -> Result<(), &'static str>
pub fn set_interactive_list_item_binding( &mut self, id: &str, index: usize, binding: Option<AdapterItemBinding>, ) -> Result<(), &'static str>
Set a per-item binding that may include supported interactive XML controls.
Sourcepub fn set_list_fixed_views(
&mut self,
id: &str,
headers: Vec<ListFixedView>,
footers: Vec<ListFixedView>,
) -> Result<(), &'static str>
pub fn set_list_fixed_views( &mut self, id: &str, headers: Vec<ListFixedView>, footers: Vec<ListFixedView>, ) -> Result<(), &'static str>
Replace fixed header and footer views, including supported interactive children.
Sourcepub fn set_list_adapter(
&mut self,
id: &str,
items: Vec<String>,
ids: Option<Vec<i64>>,
enabled: Option<Vec<bool>>,
) -> Result<(), &'static str>
pub fn set_list_adapter( &mut self, id: &str, items: Vec<String>, ids: Option<Vec<i64>>, enabled: Option<Vec<bool>>, ) -> Result<(), &'static str>
Replace a ListView adapter, preserving checked items by stable ID when both adapters provide IDs, or by position otherwise. Missing items are unchecked.
Sourcepub fn set_spinner_adapter(
&mut self,
id: &str,
items: Vec<String>,
ids: Option<Vec<i64>>,
enabled: Option<Vec<bool>>,
) -> Result<(), &'static str>
pub fn set_spinner_adapter( &mut self, id: &str, items: Vec<String>, ids: Option<Vec<i64>>, enabled: Option<Vec<bool>>, ) -> Result<(), &'static str>
Replace a Spinner adapter transactionally, preserving selection and the open-list highlight by stable ID when both old and new adapters have IDs.
Sourcepub fn set_zoom_controls_visible(&mut self, id: &str, visible: bool, now: f64)
pub fn set_zoom_controls_visible(&mut self, id: &str, visible: bool, now: f64)
Animate a ZoomControls view to visible or gone. Time uses frame seconds. A reversal starts from the currently presented opacity.