Alert Dialog trouble

kraxyk

Member
Joined
Feb 8, 2010
Messages
74
Reaction score
0
Hello, I am trying to get my alert box working. Can you help me? This code does not seem to work at all.

Code:
AlertDialog.Builder safetybuilder = new AlertDialog.Builder(this);
        safetybuilder.setMessage("Do not use this app while the vehicle is in motion. Doing so can seriously injur yourself or someone else. We are not responsible for anything that may happen. Please use this at your own risk.");
        safetybuilder.setCancelable(false);
        safetybuilder.setPositiveButton("Agree", new DialogInterface.OnClickListener() {
            
            public void onClick(DialogInterface dialog, int which) {
                // TODO Auto-generated method stub
                dialog.cancel();
            }
        });
        
        safetybuilder.setNegativeButton("Close", new DialogInterface.OnClickListener() {
            
            public void onClick(DialogInterface dialog, int which) {
                // TODO Auto-generated method stub
                System.exit(0);
            }
        });
        AlertDialog safety = safetybuilder.create();
        safetybuilder.create();
 
OP
K

kraxyk

Member
Joined
Feb 8, 2010
Messages
74
Reaction score
0
Is it formatted wrong? Or is it missing something?
 
Top