I have used AlertDialog, when click on button its going to main screen. I am not getting alert box?
 alertDialog.setPositiveButton(R.id.button1, new 
    DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            // TODO Auto-generated method stub
            Toast.makeText(getActivity(), "save me**********************", Toast.LENGTH_SHORT).show();
            Toast.makeText(getActivity(), "you have pressed save", Toast.LENGTH_SHORT).show();
        }
    });
alertDialog.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
 
     
     
    