Android implements the pop up keyboard method

  • 2020-06-03 08:27:00
  • OfStack

This article describes the Android implementation of pop-up keyboard code, is a very practical function. The code is very concise. Share to everybody for everybody reference.

The specific function code is as follows:

Timer timer = new Timer();
timer.schedule(new TimerTask() {
 public void run() {
 InputMethodManager m = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
 m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
}, 300);

I hope this article is helpful for you to learn Android programming.

Related articles: