Repository navigation
feat(android): touch input, system long-press delay, and LayerHost popup fallback - #2709
Merged
Merged
Conversation
Hona
force-pushed
the
feat/android-s2-touch
branch
2 times, most recently
from
November 28, 2026 02:32
05f7ca4 to
959a125
Compare
…rHost popup fallback
Hona
force-pushed
the
feat/android-s2-touch
branch
from
November 28, 2026 02:33
959a125 to
bca79ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Android slice S2 (#2649): native touch forwarding, configurable system long-press delay,
LayerHostApp::on_popup_menufallback support, andexamples/android-gallery.Summary
RuneView.onTouchEvent->platform::android):ACTION_MOVE(including all batched historical samples in chronological order before the current sample), andACTION_CANCELacross JNI (nativeTouch).crates/rune/src/platform/android/touch.rs(including API 33+MotionEvent.FLAG_CANCELEDmapped toTouchPhase::Cancelled).platform::android::machineand separates timer wakes from background thread wakes inRuneView.kt.Runtime::set_touch_long_press/Runtime::touch_long_press):runtime/input/touch.rswith a host-configurable delay (default0.5s; zero, negative, or non-finite values restore the default).RuneViewforwardsViewConfiguration.getLongPressTimeout()on init and resume (nativeLongPressTimeout), picking up Android's default 400 ms delay and accessibility Touch & hold delay changes (up to 1500 ms).SCROLL_DECAY = 2.002,±8000 pt/s) for S2, matching iOS and web.App::on_popup_menuonLayerHost(platform/embed_frame.rs):popup_menu_supported()falseon Android and iOS.embed_frame::flush_requeststo honorApp::on_popup_menuwhenpopup_menu_fallback_activeis true (matching desktop Linux) instead of unconditionally cancelling open/queued fallback pop-up menus; apps withouton_popup_menustill resolve toNoneimmediately.examples/android-gallery: Splitsexamples/kit-galleryintolib.rs+ thinmain.rs, addsexamples/android-gallery(cdylib+AndroidManifest.xml), and adds-p android-galleryto.github/workflows/android.yml.Verification
cargo test -p rune --lib runtime::input::touch(53 passed, includingset_touch_long_press400 ms / 1500 ms / invalid-value fallback).cargo test -p rune --lib platform::android(12 passed: Android action/flag mapping, coordinate/time conversions, batched touch pipeline, state-machine frame deduplication and cached timeout replay).cargo test -p rune --lib platform::embed_frame(10 passed, includingApp::on_popup_menukept alive across frames and delivered onmissed_stepvs cancelled when unregistered).cargo test -p rune --doc set_touch_long_press(1 passed).cargo test -p android-gallery(1 passed) andcargo check -p kit-gallery --all-targets.aarch64-linux-android,x86_64-linux-androidincludingandroid-gallery), Kotlin compilation (kotlinc+d8+ APK packaging),check, andsize.Fixes #2649