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.
精彩评论