7

I saw different questions on the subject, but not exactly what I'm looking for. The question is: how to foce the IME to show up in full screen (extract) mode when editing a particular edit text? What I want is the IME to behave as it sees fit, except for that particular edit text, which I need the IME to go full screen on it.

I have tried the following, but that doesn't do it:

   mEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            if (hasFocus) {
                InputMethodManager input = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                if(input != null) {
                    input.showSoftInput(mEditText, InputMethodManager.SHOW_FORCED);
                }
            }
        }
    });

Aside the 'why I'm doing this', any idea? I thought I could start an activity with a single edit text in it, but I'd prefer to use the IME's capabilities. Thanks.

johnny_g
  • 71
  • 2
  • AFAIK, there's no way to force the IME to go into fullscreen mode. There are flags you can place on the input type to **prevent** this behavior, but I don't see any similar flags in the framework to force this behavior. (`EditorInfo.IME_FLAG_NO_EXTRACT_UI` & `EditorInfo.IME_FLAG_NO_FULLSCREEN`) – Karakuri Jun 14 '13 at 19:02
  • Even when trying to prevent fullscreen mode, you're at the mercy of the input method. IME_FLAG_NO_FULLSCREEN will be honored by the default implementation of `InputMethodService.onEvaluateFullscreenMode` but an override might not bother. – j__m Sep 25 '16 at 10:59

1 Answers1

0

I think the correct solution for this would be to start a new activity from your ime when you so desire that may contain just a text box, and once you are done editing, the ime can simply keep a copy of the text and paste the same to the original text box automatically.

I am not sure if this can be done as easily as i have said it, but i do believe this will be the correct way to go about it.

flide
  • 189
  • 16