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;
}