在android视图中纵向和横向之间切换时出现问题
在我的应用程序中,我将在网络视图中显示一个网页,它工作正常,但如果我在横向和纵向之间切换,反之亦然,那么它会退出并进入主页。 prblm是什么?
日志猫:
03-10 13:35:47.123: INFO/WindowManager(69): Setting rotation to 1, animFlags=1
03-10 13:35:47.242: INFO/ActivityManager(69): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/1 nav=3/1 orien=2 layout=17 uiMode=17 seq=70}
03-10 13:35:47.363: INFO/UsageStats(69): Unexpected resume of com.mireader while already resumed in com.mireader
03-10 13:35:50.413: DEBUG/dalvikvm(69): GC_EXPLICIT freed 395 objects / 20424 bytes in 195ms
In my application im going to display a web page in web view , it works fine but if i flip between landscape to portrait or vice versa, then it exits and comes to main page. wht is the prblm?
logcat:
03-10 13:35:47.123: INFO/WindowManager(69): Setting rotation to 1, animFlags=1
03-10 13:35:47.242: INFO/ActivityManager(69): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/1 nav=3/1 orien=2 layout=17 uiMode=17 seq=70}
03-10 13:35:47.363: INFO/UsageStats(69): Unexpected resume of com.mireader while already resumed in com.mireader
03-10 13:35:50.413: DEBUG/dalvikvm(69): GC_EXPLICIT freed 395 objects / 20424 bytes in 195ms
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于设备方向正在改变,因此活动被破坏然后重新创建。
这也导致活动的内容视图被重新创建。
请参阅 http://developer.android.com/reference/android/app/ Activity.html#ConfigurationChanges 了解更多详细信息。
Since the device orientation is changing, the activity is destroyed then recreated.
This also leads the activity's contentview to be recreated.
See http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges for more details.