File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 33
33
import java .util .regex .*;
34
34
import java .util .zip .*;
35
35
36
+ import android .view .inputmethod .InputMethodManager ;
36
37
import android .app .Activity ;
37
38
import android .content .*;
38
39
import android .content .pm .PackageManager ;
@@ -766,6 +767,18 @@ public boolean checkPermission(String permission) {
766
767
return false ;
767
768
}
768
769
}
770
+
771
+ public void openKeyboard () {
772
+ Context context = surface .getContext ();
773
+ InputMethodManager imm = (InputMethodManager )context .getSystemService (Context .INPUT_METHOD_SERVICE );
774
+ imm .toggleSoftInput (InputMethodManager .SHOW_FORCED ,0 );
775
+ }
776
+
777
+ public void closeKeyboard () {
778
+ Context context = surface .getContext ();
779
+ InputMethodManager imm = (InputMethodManager )context .getSystemService (Context .INPUT_METHOD_SERVICE );
780
+ imm .toggleSoftInput (InputMethodManager .HIDE_IMPLICIT_ONLY , 0 );
781
+ }
769
782
770
783
771
784
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
You can’t perform that action at this time.
0 commit comments