1

I want when mobile keyboard is active hide the button on the activity. I search and found this code, but don't worked.

private boolean is_active_keyboard() {
    InputMethodManager imm = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);
    if (imm.isAcceptingText())
        return true;
    else
        return false;
}
hmahdavi
  • 2,040
  • 3
  • 26
  • 77

0 Answers0