开发者

Android orientation and keyboard issue

开发者 https://www.devze.com 2023-03-15 21:29 出处:网络
I\'ve been doing final testing on my app and everything is solid, except last night I noticed that when I flip the keyboard out on my friend\'s Motorola Droid, it restarts the activity or crashes (if

I've been doing final testing on my app and everything is solid, except last night I noticed that when I flip the keyboard out on my friend's Motorola Droid, it restarts the activity or crashes (if it is doing work at the time the keyboard is open) the app. Ive done some searhing online and in a book I have and havent found much on this topic.

My screens are all locked into portrait mode for good reason. I need to make sure sliding out a keyboard si开发者_如何学运维mply allows the app to continue doing what it is doing. I dont need to change orientation or anything, just trap the event and allow the app to keep going...


Check out this post

How to handle screen orientation change when progress dialog and background thread active?


In the manifest for your activity there is something called configChanges. If this is not set then events like this (keyboard pulling, orientation change etc.) will restart your activity.

Just look over on developer.android.com for the article on handling orientation changes. its the same principle for keyboard changes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号