How can I disable custom keyboard full screen mode?

I am trying to make a custom keyboard . When using a key, the keyboard always makes full screen mode , but when using the system keyboard, everything is fine. Does anyone know how to fix this? For a better understanding, including images.

Current state:

1- My keyboard My keyboard 2- System keyboard System keyboard

What it looks like.

3 - What I want (not screenshot - edited in paint) What I want

+3


source to share


2 answers


The following code in InputMethodService should solve your problem:



@Override
public boolean onEvaluateFullscreenMode() {
    return false;
}

      

+4


source


There are several ways to disable this full screen keyboard in landscape mode,

 @Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {

    outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;


}

      

or

add the following line in EditText

in xml,



android:imeOptions="flagNoExtractUi"

      

or

editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);

      

+3


source







All Articles