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