I would suggest placing it inside onFocusChanged. onStart() will NOT
work for all SDK versions.

On Oct 23, 1:05 pm, Kostya Vasilyev <[email protected]> wrote:
> Nathan,
>
> You might want to move the code into onStart.
>
> Another thing to try is to allow the application's message loop to
> unclog a little, before loading it with more events.
>
> I've seen startActivityForResult cause the parent activity to be not
> drawn at all, if used too early in the parent activity's lifecycle.
>
> The fix was to post startActivityForResult at the end of the message queue:
>
> private Handler mHandler = new Handler();
> private Runnable mShowChangeLogTask = new Runnable() {
> @Override
> public void run() {
> Intent intent = new Intent(ParentActivity.this, ChangeLogActivity.class);
> startActivityForResult(intent, REQUEST_CHANGELOG);
>
> }
> };
>
> -- Kostya
>
> 23.10.2010 1:20, Nathan пишет:
>
>
>
> > Believe me, I am not trying to create an invisible AlertDialog.
>
> > But I believe I have one. I'm not making this up.
>
> > Behavior: main activity starts and is completely unresponsive. No
> > dialog appears. No Force close/ANR appears even after much time in
> > this state. But if I push the back button, it becomes responsive
> > again.
>
> > This does not occur when debuggable is true in the manifest, so I
> > can't investigate using the debugger.
>
> > But I found out the following with log statements.
>
> > MainActrivity:OnCreate starts another activity, a welcome screen.
> > MainActivity:OnResume is called while the other activity is visible.
> > OnResume creates the dialog and calls dlg.Show();
> > WelcomeActivity is dismissed.
> > MainActivity:OnResume is called. The OnResume method is smart enough
> > to note that the dialog has already been shown and does not create it
> > again.
> > MainActivity is unresponsive. No dialog in sight.
> > When I push the back button, a log statement confirms that the
> > OnCancelListener is called on the dialog.
>
> > This is Nexus One with  2.2.1.
>
> > As cool as an invisible dialog is, I'd rather not have it. Can I fix
> > it?
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget 
> --http://kmansoft.wordpress.com

-- 
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