I have a tab which when clicked on will force open the keyboard. This works fine, but there is also a numerical input field on this app, so when I use this and go back to the tab which opens up the keyboard it opens up a numerical keyboard (number pad). How can I make it so it forces open the normal keyboard?
Here's the code that deals with the keyboard opening and closing on tab changes:
public void onTabChanged(String tab){
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if(tab.equals("keyboardTab")) {
// open keyboard
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
else {
// close keyboard
imm.hideSoftInputFromWindow(getWindow().getCurrentFocus().getWindowToken(), 0);
}
}