简体   繁体   中英

Android, activity is not recreated on soft keyboard visibility change

When the software keyboard appears/disappears my activity is not restarted. Why is this? I have not done anything to handle these events myself, as described here: http://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChange

I have not overridden onConfigurationChanged or declared android:configChanges in the activity entry in the manifest. I even tried setting android:configChanges="" in the manifest, but it does not help.

Edit: could it be my listview is catching the event, because I have enabled filtering?

Edit: disabling text filtering did not fix it.

Stack overflow is being a bitch and saying I don't have enough karma to answer, so i'll do it here: The solution is to use http://developer.android.com/reference/android/view/View.html#onSizeChanged%28int,%20int,%20int,%20int%29 as the activity is not supposed to restart.

Soft keyboard changes do not trigger configuration change event. Only hardware keyboard does.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM