Skip to content

Commit 8a6933f

Browse files
committed
moved open/closeKeyboard functions to the keyboard section
1 parent 8be54d3 commit 8a6933f

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

core/src/processing/core/PApplet.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -769,18 +769,6 @@ public boolean checkPermission(String permission) {
769769
return false;
770770
}
771771
}
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-
}
784772

785773

786774
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@@ -2401,6 +2389,20 @@ protected void nativeKeyEvent(android.view.KeyEvent event) {
24012389
}
24022390

24032391

2392+
public void openKeyboard() {
2393+
Context context = surface.getContext();
2394+
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
2395+
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
2396+
}
2397+
2398+
2399+
public void closeKeyboard() {
2400+
Context context = surface.getContext();
2401+
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
2402+
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
2403+
}
2404+
2405+
24042406
public void keyPressed() { }
24052407

24062408

0 commit comments

Comments
 (0)