1

Need to save user's name via AlertDialog that shows only once

view story
linux-howto

http://stackoverflow.com – I have an AlertDialog that shows when a button is pressed; saves the user's name when the Alert "Done" button is pressed; then moves user to another activity. What I am trying to figure out is how to present the AlertDialog only on the first press of this layout button that presents the AlertDialog, so that when the user comes back to this part of the app, and presses the same layout button, the AlertDialog doesn't show, and the user does not have to type their name in again. Here is the code that's not working: public class CloseoutActivity extends Activity { SharedPreferences prefs2; S (HowTos)