I have an editText and a toolbar. When I focus the editText I hide the toolbar and show the softKeyboard so the user can enter text.
The problem is when pressing the back key, I added an on back pressed method to show again the toolbar:
@Override
public void onBackPressed() {
//show toolbar
toolbar_bottom.setVisibility(View.VISIBLE);
}
But it first hides the keyboard and is until the second press when my toolbar is visible again. Is there a way for hiding keyboard and making visible the toolbar with just one press?