N
N
newdancer2016-07-14 00:30:29
Android
newdancer, 2016-07-14 00:30:29

When opening the keyboard, there is a big gap between the keyboard and the edittext?

When opening the keyboard, there is a big gap between the keyboard and the edittext?
Here is the screenshot:
77043018440b4ac98872cc901db17d3c.png
How to deal with it? Appears on Sony phones with resolutions less than hd.
From what I've tried. In the manifest for the activity, I wrote:
android:windowSoftInputMode="adjustPan"
also, before the keyboard is called, the edittext focus is transferred. And a keyboard call is made

addText.requestFocus();
    InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lopatoid, 2016-07-21
@lopatoid

android:windowSoftInputMode="adjustResize"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question