keinabel keinabel - 8 months ago 64
Android Question

How to access the "DONE" button when holding Android horizontically?

I have an editText field where the user is supposed to enter keys and a button that is supposed to start a background task (see screenshot).

enter image description here

But when I enter landscape mode, the button disappears and is replaced by a


enter image description here

So, now I need to either know, how to access this
button to tell the app to stop the background task or make my
reappear again.

Can you provide me with info on any of these?


In the landscape mode, your IME went to full screen. In order to avoid that, you can add to the xml file: android:imeOptions="flagNoExtractUi"

or take a look at this Stackoverflow's Q/A and solution from there:

public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
    outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;