title: How to display Toast from AlertDialog?
body: <p>When the user clicks on the save button, an <code>AlertDialog</code> appears and asks the user to input text for the file name. </p>
  
  <p>If the user clicks the positive button ("Ok") without specifying a name, I want to display a toast which asks them to do so, and keep the <code>AlertDialog</code> open. But the toast never displays and the dialog closes. </p>
  
  <p>The code for the <code>AlertDialog</code> is here:</p>
  
  <pre><code>    AlertDialog.Builder alert = new AlertDialog.Builder(this);
  
      alert.setTitle(R.string.save_game);
      alert.setMessage(R.string.request_name);
  
      // Set an EditText view to get user input 
      final EditText input = new EditText(this);
      input.setHint(R.string.untitled);
      alert.setView(input);
  
      alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int whichButton) {
        String value = input.getText().toString();
        if(value != null){
            // Do something with value      
        }
        else{
            Toast.makeText(context, R.string.no_name_given, Toast.LENGTH_SHORT).show();
        }
      }
      });
  
      alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int whichButton) {
          // Canceled.
      }
      });
  
      alert.show();
  </code></pre>
  
  <p>How can I make this happen?</p>
  
  <p>Thanks!</p>