hi all,

My LoginDialog spawns a progress dialog during the login process.
this is achieved the canonical way, through the use of a handler,
which is in charge of executing the login code.

public class LoginDialog extends Dialog {
    private ProgressDialog mProgressDialog;

    private Handler mProgressDialogHandler  = new Handler() {
        public void handleMessage(Message msg) {
            mProgressDialog.dismiss();
    }

    private void login()   {
        mProgressDialog = ProgressDialog.show(getContext(), "Login",
                       "Authenticating ... ", true, true);
       // start login code here
       mProgressDialogHandler.post(new Runnable() {
               public void run() {
                   login();
               }
           }
       );

      // end login code here
      mProgressDialogHandler.sendEmptyMessage(0);
    }
}

I hope I haven't left anything out.  The ProgressDialog does show up,
however it doesn't rotate!
your help will be immensely appreciated.  I will also welcome any
suggestions on how to improve the login design ...
Many thanks in advance.

Luka
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to