> Step #1: Take your UI setup that is in onCreate() and move it to a
> separate method (e.g., setupViews())
>
> Step #2: Call setupViews() from onCreate()
>
> Step #3: Call setupViews() from onConfigurationChanged()
>
> Done. ~4 lines of code.

Except you would have to make sure to destroy/recreate anything your
Activity might have a reference to that would need a new
configuration. Of course you can make it work, but you can easily
break your solution in subtle ways. The only reason to handle
orientation change yourself is if the destroy/create process is very
heavy (webpage loading for instance.)

> And it's the exact same code path that a
> destroy/recreate will go down, so it's not like this adds unusual
> performance overhead.

No it is not. You are keeping the same Activity instance and any state
associated with it. It is very different.

-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to