showAlertDialog();

  private void showAlertDialog(){
    final AlertDialog alert=new AlertDialog.Builder(this).create();
    alert.setMessage("这是您第一次登陆");
    alert.setButton("登陆", new DialogInterface.OnClickListener() {
   
   @Override
   public void onClick(DialogInterface dialog, int which) {
    alert.dismiss();
     }
  });
    alert.show();
   }
  

你可能感兴趣的:(dialog)