0

It's a game named I'm MT3 ,developed by others...And I want to implement this feature,the custom input layout which contains a EditText and 2 buttons.

The name of each button means "OK" and "Cancel" respectively.

first,I'm using InputMethodManager to show the InputMethodManager , and this is my code snip below:

InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);
Racil Hilan
  • 23,737
  • 12
  • 48
  • 51
Melody
  • 11
  • 6

1 Answers1

0

Finally,I solved the problem myself. The answer of @Polarbear0106is right,but the soft keyboard is still in full-screen mode. And here is an answer to disable fullscreen. Disabling the fullscreen editing view for soft keyboard input in landscape?

It's my solution:

If you create the EditText by code,just add this line:

    //EditText et;
    et.setImeOptions(et.getImeOptions()| EditorInfo.IME_FLAG_NO_EXTRACT_UI);

or if you create the EditText by xml:

just add the property android:imeOptions="flagNoExtractUi" to each EditText in your XML file.

Community
  • 1
  • 1
Melody
  • 11
  • 6