android dialog box issue
I have an issue in android development. I want to display Dialog Box when the application is launched before loading and launching the activity.
or you can say I want to show the dialog on launcher after the launch of 开发者_如何学Cmy application.
Why not show a dialog in onCreate
of your MAIN
activity?
You should consider having a InitActivity
that does what @Teja Kantemneni does : launching a dialog and launching your own "real first activity" when user clicks on the right button.
Alternative : I would also try to do it from the application class itself, but I am not sure of the result.
Create an application class, reference it in the manifest file, override onCreate and show your dialog. But honestly, I think it will already be too late and your main activity already launched at this point.
Regards, Stéphane
You can show your dialog in your onCreate
event in your startup activity.
You can then run your main code process once the user has confirmed the dialog (ie. capture the event and process your main code)
All this can be done in your onCreateDialog
精彩评论