1

365体育足球滚球比分I have a layout with 2 EditText element and 2 Radio Buttons (each row has Radio Button and Edit Text), when I switch between the editText elements the keyboard stays on the screen and doesn't disappear, When I switch between the textViews using the Radio Buttons, every click on each element is closing the soft keyboard and than the next click will open it, my method for changing the focus in the Radio buttons:

  private void showKeyboard(InputFieldNewStyle inputFieldNewStyle) {
        inputFieldNewStyle.requestFocus();

        InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Activity.INPUT_METHOD_SERVICE);
        imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
    }

I tried using imm.isActive(); and imm.isAcceptingText();365体育足球滚球比分 both doesn't work for me, how can I just force the keyboard to stay visible while the user specifically didn't press to close the keyboard? Thanks

| improve this question | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy365体育足球滚球比分

Browse other questions tagged or ask your own question.