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
  • 24,690
  • 13
  • 50
  • 55
Melody
  • 11
  • 6
  • Just create an xml layout with background, edittext and two buttons. I'm assuming one is OK and one is CANCEL – Zoe Jul 09 '16 at 09:58

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