From dd1dfb1fac6c9e97adcb1df21373d0d55bc8ea00 Mon Sep 17 00:00:00 2001 From: Piotr Podusowski Date: Sun, 10 Nov 2024 21:23:10 +0100 Subject: [PATCH] Use android-activity's show_soft_input to summon the keyboard. --- src/platform_impl/android/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/android/mod.rs b/src/platform_impl/android/mod.rs index 533316e62f..27be9baee7 100644 --- a/src/platform_impl/android/mod.rs +++ b/src/platform_impl/android/mod.rs @@ -921,7 +921,13 @@ impl CoreWindow for Window { fn set_ime_cursor_area(&self, _position: Position, _size: Size) {} - fn set_ime_allowed(&self, _allowed: bool) {} + fn set_ime_allowed(&self, allowed: bool) { + if allowed { + self.app.show_soft_input(true); + } else { + self.app.hide_soft_input(true); + } + } fn set_ime_purpose(&self, _purpose: ImePurpose) {}