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 ;
@@ -768,6 +769,18 @@ public boolean checkPermission(String permission) {
768
769
return false ;
769
770
}
770
771
}
772
+
773
+ public void openKeyboard () {
774
+ Context context = surface .getContext ();
775
+ InputMethodManager imm = (InputMethodManager )context .getSystemService (Context .INPUT_METHOD_SERVICE );
776
+ imm .toggleSoftInput (InputMethodManager .SHOW_FORCED ,0 );
777
+ }
778
+
779
+ public void closeKeyboard () {
780
+ Context context = surface .getContext ();
781
+ InputMethodManager imm = (InputMethodManager )context .getSystemService (Context .INPUT_METHOD_SERVICE );
782
+ imm .toggleSoftInput (InputMethodManager .HIDE_IMPLICIT_ONLY , 0 );
783
+ }
771
784
772
785
773
786
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
You can’t perform that action at this time.
0 commit comments