File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,17 @@ fn scale_factor<'local>(env: &mut JNIEnv<'local>, android_ctx: &Context<'local>)
6969 metrics. density ( env) as f64
7070}
7171
72+ fn show_soft_input < ' local > ( env : & mut JNIEnv < ' local > , view : & View < ' local > ) {
73+ let imm = view. input_method_manager ( env) ;
74+ imm. show_soft_input ( env, view, 0 ) ;
75+ }
76+
77+ fn hide_soft_input < ' local > ( env : & mut JNIEnv < ' local > , view : & View < ' local > ) {
78+ let imm = view. input_method_manager ( env) ;
79+ let window_token = view. window_token ( env) ;
80+ imm. hide_soft_input_from_window ( env, & window_token, 0 ) ;
81+ }
82+
7283pub struct MasonryState {
7384 render_cx : RenderContext ,
7485 render_root : RenderRoot ,
@@ -144,10 +155,10 @@ impl<Driver: AppDriver> MasonryViewPeer<Driver> {
144155 . on_action ( & mut driver_ctx, widget_id, action) ;
145156 }
146157 RenderRootSignal :: StartIme => {
147- // TODO
158+ ctx . push_static_deferred_callback ( show_soft_input ) ;
148159 }
149160 RenderRootSignal :: EndIme => {
150- // TODO
161+ ctx . push_static_deferred_callback ( hide_soft_input ) ;
151162 }
152163 RenderRootSignal :: ImeMoved ( _position, _size) => {
153164 // TODO
You can’t perform that action at this time.
0 commit comments