I did a little more homework:

http://stackoverflow.com/questions/3483182/activity-finish-method-waits-to-finish
http://stackoverflow.com/questions/2590947/about-finish-in-android

This makes me feel better about calling finish() and then
startActivity(). I may take the refactoring advice,
but in the meantime, I've isolated the problem to a thread that uses
AudioTrack to play short samples. I've arranged for it not to be
running
when the UI is being reset and all is good.

On Sep 8, 1:09 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Wed, Sep 8, 2010 at 3:44 PM, OldSkoolMark <m...@sublimeslime.com> wrote:
> > Alternative design approaches would also be greatly appreciated.
>
> Step #1: Refactor such that your UI initialization is not in
> onCreate(), but is in some other private method (referred to here as
> setupViews()).
>
> Step #2: In onResume(), on a change in layout, call setupViews().
>
> Step #3: There is no step #3.
>
> In other words, why destroy and recreate the activity just to load in
> a different layout? Heck, developers grumble constantly about Android
> doing that by default for orientation changes...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://skillsmatter.com/go/os-mobile-server

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

Reply via email to