Skip to main content

LayoutState

Struct LayoutState 

Source
pub struct LayoutState {
Show 113 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>, /* private fields */
}

Fields§

§theme_style: AndroidTheme

Active Android Material / Material 3 theme preset; defaults to AndroidTheme::Bhoo.

§density: f32

Runtime display density multiplier (dp -> logical px). Defaults to 1.0.

§font_scale: f32

Runtime 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.

§menu_allow_text_with_icon: Option<bool>

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: bool

Layout 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>§toolbar_navigation_clicked: HashSet<String>

Most recent Toolbar navigation action, keyed by XML view ID.

§toolbar_title_colors: HashMap<String, Color>§toolbar_subtitle_colors: HashMap<String, Color>§toolbar_menu_items: HashMap<String, Vec<AndroidToolbarMenuItem>>

Toolbar menu entries supplied by the host, in display order.

§toolbar_menu_clicked: HashMap<String, u64>

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: CalendarLocale

Localized 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.

§nav_badges: HashMap<String, String>

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.

Implementations§

Source§

impl LayoutState

Source

pub fn effective_density(&self) -> f32

Effective display density multiplier (<= 0.0 or non-finite defaults to 1.0).

Source

pub fn effective_font_scale(&self) -> f32

Effective font scale multiplier (<= 0.0 or non-finite defaults to 1.0).

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn tab_host_created_count(&self, id: &str) -> usize

Number of factory-backed tabs created for this host.

Source

pub fn set_tab_host_by_tag(&mut self, id: &str, tag: &str) -> bool

Select the first tab with the given tag.

Source

pub fn set_tab_host_current(&mut self, id: &str, index: usize) -> bool

Select a configured tab; invalid indices leave the current tab unchanged.

Source

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.

Source

pub fn hide_floating_media_controller(&mut self, id: &str)

Source

pub fn floating_media_controller_is_showing(&self, id: &str) -> bool

Source

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.

Source

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.

Source

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.

Source

pub fn collapse_list_group(&mut self, id: &str, group: usize) -> bool

Source

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.

Source

pub fn set_toolbar_group_checkable( &mut self, toolbar: &str, group_id: u64, checkable: bool, exclusive: bool, )

Source

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.

Source

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.

Source

pub fn set_autocomplete_items(&mut self, id: &str, items: Vec<String>)

Replace the synchronous ArrayAdapter-style suggestions for an AutoCompleteTextView.

Source

pub fn take_search_focus_request(&mut self, id: &str) -> bool

Consume a pending request to focus the host SearchView editor.

Source

pub fn set_search_query(&mut self, id: &str, text: &str)

Set a SearchView query from a host editor and request a change callback.

Submit a nonblank query; the host receives the original query unchanged.

Source

pub fn end_number_picker_edit(&mut self, id: &str, commit: bool) -> bool

Finish a NumberPicker text edit. Empty input restores the previous value.

Source

pub fn update_time_clock_input(&mut self, field_id: &str)

Apply a host text update to a clock-mode TimePicker field.

Source

pub fn autocomplete_has_highlight(&self, id: &str) -> bool

Source

pub fn autocomplete_is_open(&self, id: &str) -> bool

Whether the suggestion popup belongs to the given XML field.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn set_sliding_drawer_locked(&mut self, id: &str, locked: bool)

Prevent user gestures on a SlidingDrawer. Programmatic requests still work.

Source

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.

Source

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.

Source

pub fn stack_step(&mut self, id: &str, delta: isize) -> bool

Advance the displayed StackView adapter item, respecting its loop policy.

Source

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.

Source

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.

Source

pub fn list_item_control_checked( &self, id: &str, item_id: i64, view_id: &str, ) -> Option<bool>

Source

pub fn list_fixed_control_checked( &self, id: &str, footer: bool, index: usize, view_id: &str, ) -> Option<bool>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for LayoutState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for LayoutState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.