开发者

Handling Screen Orientation

开发者 https://www.devze.com 2023-01-05 16:39 出处:网络
My project is working fine when i ho开发者_运维知识库ld my HTC device vertical. But the moment i rotate my screen 90degrees , it throws a force close error.Starts all over again, runs fine untill i ag

My project is working fine when i ho开发者_运维知识库ld my HTC device vertical. But the moment i rotate my screen 90degrees , it throws a force close error.Starts all over again, runs fine untill i again change the orientation.

How do i handle it ?


This is considered a runtime change of configuration (screen orientation). Read this article to learn how to handle this - http://developer.android.com/guide/topics/resources/runtime-changes.html

Cheers


To add on to what Matty mentioned.... I had gone through lot of sleepless nights due to this screen change behavior and trying to arrive at a good solution for the same. Fortunately, somebody pointed me to the below blog. That was it.... a very good explanation and possible solutions to this problem.

Refer http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/ for details.

0

精彩评论

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