4

After entering text using android soft-keyboard and manually closing it using the key available below the keyboard, the app page is not getting refreshed. A black space is shown where the keyboard had existed.

I tried with various options available for windowSoftInputMode and it does not fix this issue. Sadly, adjustPan is not showing its expected behavior. The keyboard hides the text fields when the windowSoftInputMode is set to adjustPan.

How can I make the page refresh after the soft-keyboard is hidden so as to eliminate this problem ?

4

2 回答 2

6

Depending upon your circumstances, adding

android:windowSoftInputMode="adjustPan"

or

android:windowSoftInputMode="adjustNothing"

to the activity tag in the manifest may solve the issue.

Both worked in my case.

于 2013-12-28T00:46:44.200 回答
1

Try this in manifest,

android:windowSoftInputMode="stateHidden" 
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"

Try this code also,

android:configChanges="keyboardHidden"

Or try this also,

InputMethodManager imm = (InputMethodManager)getSystemService(
      Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
于 2013-10-16T05:43:35.137 回答