Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling the fullscreen editing view for soft keyboard input in landscape?

People also ask

How do I turn off full screen keyboard?

Press the F11 key on your computer's keyboard to exit full-screen mode. Note that pressing the key again will toggle you back to full-screen mode.

What is Imeoption Android?

android:imeOptions="actionSend" /> You can then listen for presses on the action button by defining a TextView.OnEditorActionListener for the EditText element. In your listener, respond to the appropriate IME action ID defined in the EditorInfo class, such as IME_ACTION_SEND . For example: Kotlin Java.


I finally answered my own question:

The extract UI (i.e. the fullscreen editing mode) can be disabled at the point at which the input connection is hooked up:

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {

    outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;

    // etc.
}

To do that, navigate to activity xml and paste android:imeOptions="flagNoExtractUi" in your code. But where should it be pasted? Have look at code of example activity xml and look at EditText:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"         
    >

    <EditText
        android:imeOptions="flagNoExtractUi"

        android:id="@+id/etTextInAct"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10" >   
        <requestFocus />
    </EditText>

</LinearLayout>
      

If you want more customisation options for the keyboard see http://developer.android.com/guide/topics/ui/controls/text.html


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


The answer above helped me figure out the solution for dynamically added EditTexts:

editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);

Use android:imeOptions="flagNoFullscreen" to achieve that feature.


Also, if you want to combine multiple imeOptions programaticaly, you can use the | syntax.

For example, in order to disable the fullscreen edit view in landscape and replace "Next" key by "OK" (ACTION_DONE) in keyboard, you can use:

editText.setImeOptions(EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI);