Hi Dianne! Thanks you for response! Can you suggest how can I implement so simple scenario: -Activity started - the user already got the screen. -Immediately after activity UI dispalyed I need to start update process indicated by progress dialog
I tried to impelement onPrepareDialog, onStart, and onPostCreated. Both happens before the actually activity displayed and as result the progress dialog is invisilible. I need something like "onAfterActivityDisplayed( )" Event which happenning after onCreateDialog( ). Thanks, Evgeny On Wed, Feb 18, 2009 at 1:26 AM, Dianne Hackborn <hack...@android.com>wrote: > Dialogs are not blocking. You can't stop things from continuing execution > while displaying the dialog. > > > On Fri, Feb 13, 2009 at 3:31 PM, EvgenyV <evgen...@gmail.com> wrote: > >> >> Hi! >> I'm trying to show dialog OK/Cancel and then continue construction >> after user closed the dialog. >> Unfortunately the dialog get visibility only AFTER the creation of >> myclass was completed. >> In my example Run( ) method will never run. >> >> There is code: >> >> public class MyClass extends Activity >> { >> private _boolFlag = false; >> >> @Override >> public void onCreate(Bundle savedInstanceState) { >> try { >> >> super.onCreate(savedInstanceState); >> ....some code... >> showDialog(Dialog.BUTTON2); >> if(_boolFlag) >> Run().// never run >> } >> } >> >> >> @Override >> protected Dialog onCreateDialog(int id) >> { >> switch (id) >> { >> case Dialog.BUTTON2: >> return new AlertDialog.Builder(this) >> .setIcon(R.drawable.files_down_32) >> .setTitle("title") >> .setPositiveButton("Ok", new >> DialogInterface.OnClickListener() { >> public void onClick(DialogInterface dialog, int >> whichButton) { >> _boolFlag = true; >> } >> }).create(); >> } >> return null; >> } >> >> private void Run() >> { >> >> } >> >> } >> >> What can I do except to move the dialog to the caller activity? >> >> Thanks in advance, >> Evgeny >> >> > > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > 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 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 -~----------~----~----~----~------~----~------~--~---