title: AlertDialog with OK/Cancel buttons
body: <p>I create this AlertDialog:</p>
  
  <pre><code>            String msg = "Connessione lenta o non funzionante";
              AlertDialog alertDialog;
              alertDialog = new AlertDialog.Builder(HomePage.this).create();
              alertDialog.setTitle("Timeout connessione");
              alertDialog.setMessage(msg);
              alertDialog.show();
  </code></pre>
  
  <p>I want to add OK and Cancel buttons. I searched here on StackOverflow but setButton method seems to be deprecated. I also found setPositiveButton and setNegativeButton for AlertDialog.Builder but even them seem to be deprecated.</p>