title: Alert Dialog Two Buttons
body: <p>Hello all i have a simple problem i have a alertDialog and i want it to show two buttons i have searched here but it seems the options before don't work anymore and are deprecated.</p>
  
  <p>Anyone know the new way of doing this you can see my code below that doesn't work.</p>
  
  <pre><code>  Button share = (Button) findViewById(R.id.btn_share);
      share.setOnClickListener(new OnClickListener() {   
          public void onClick(View v) {
             // call some other methods before that I guess...
               AlertDialog alertDialog = new AlertDialog.Builder(PasswActivity.this).create(); //Read Update
               alertDialog.setTitle("Uprgade");
               alertDialog.setMessage("Upgrade Text Here");
  
               alertDialog.setButton("Upgrade", new DialogInterface.OnClickListener() {
                  public void onClick(DialogInterface dialog, int which) {
  
               });
                   alertDialog.setButton("Cancel", new DialogInterface.OnClickListener()    {
                  public void onClick(DialogInterface dialog, int which) {
  
               });
  
  
  
               alertDialog.show();  //&lt;-- See This!
  
  
      }
      });
  </code></pre>