2 Words THANK YOU!!!!!!
On Sun, Sep 26, 2010 at 1:34 PM, Kostya Vasilyev <[email protected]> wrote: > Move the declaration of done_once into the anonynous inner class itself, so > it's the same variable between first and subsequent calls to this function. > > The way you had it, as a method-local, meant it was getting created and > initialized to "false" every time through. In other words, doing nothing. > > -- Kostya > > 26.09.2010 20:44, Lucas Boucher пишет: > > "Check GPS Status Again.", new DialogInterface.OnClickListener() { > > *** > > boolean done_once = false; > * > > @Override > > > public void onClick(DialogInterface dialog, int id) { > ((AlertDialog) > dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false); > * > * > * > > if > *(!done_once) > > { > if (latitude == 0 || longitude == 0) > { > gps_initialized= > false > ; > dialog.dismiss(); > main(); > } > else > { > gps_initialized= > true; > dialog.dismiss(); > main(); > } > } > > } > }); > > > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Lucas Boucher www.pachristmas.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

