Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Examples

This page lists only example source files that exist in the current repository.

Run The Current Demo

cargo run --manifest-path android/android_phone_app/Cargo.toml

Standalone Android Package

ExampleSourcePurposeCommand
android_phoneandroid/android_phone_app/examples/android_phone.rsAndroid-style app screen with search, toggles, sliders, scroll content, and bottom navigation.cargo run --manifest-path android/android_phone_app/Cargo.toml --example android_phone

The package also has a native desktop entry point:

cargo run --manifest-path android/android_phone_app/Cargo.toml

Workspace Examples

ExampleSourcePurposeCommand
responsive_layout_testexamples/responsive_layout_test.rsStress scene for responsive screen composition.cargo run --example responsive_layout_test
toggle_seekbarexamples/toggle_seekbar.rsCompact control scene for toggle and seek-bar behavior.cargo run --example toggle_seekbar
z_order_hierarchyexamples/z_order_hierarchy.rsChecks visual ordering and hierarchy stacking behavior.cargo run --example z_order_hierarchy

Grid Layout

ExampleSourcePurposeCommand
grid_columnsexamples/grid/columns.rsGrid column sizing and layout behavior.cargo run --example grid_columns
grid_tracksexamples/grid/tracks.rsGrid track sizing behavior.cargo run --example grid_tracks
grid_auto_flowexamples/grid/auto_flow.rsGrid auto-flow placement behavior.cargo run --example grid_auto_flow
grid_item_placementexamples/grid/item_placement.rsExplicit grid item placement.cargo run --example grid_item_placement

Layout Modes

ExampleSourcePurposeCommand
layout_flexexamples/layout/flex.rsFlex layout composition.cargo run --example layout_flex
layout_masonryexamples/layout/masonry.rsMasonry layout composition.cargo run --example layout_masonry
layout_stackexamples/layout/stack.rsStack layout composition.cargo run --example layout_stack
layout_radialexamples/layout/radial.rsRadial layout composition.cargo run --example layout_radial

Widgets

ExampleSourcePurposeCommand
widgets_controlsexamples/widgets/controls.rsButtons, toggles, checkboxes, and radio controls.cargo run --example widgets_controls
widgets_inputsexamples/widgets/inputs.rsText field, select, drag-value, and seek-bar inputs.cargo run --example widgets_inputs
widgets_displayexamples/widgets/display.rsText, badges, dividers, panels, and progress display.cargo run --example widgets_display
widgets_containersexamples/widgets/containers.rsPanel window and scroll-container behavior.cargo run --example widgets_containers

Validation

Check every workspace example currently known to Cargo:

cargo check --workspace --examples

Check the Android package:

cargo check --manifest-path android/android_phone_app/Cargo.toml --all-targets