title: Android save instance state for dialog
body: <p>I have the following radio button dialog which works the way i want i also have size 12 set as the default as well but what i need to now be able to do is save the instancestate that is when something else is selected i want that size to be selected when the app is opened again. Here is my code</p>
  
  <pre><code>final CharSequence[] items = {"12m", "16m", "20m"};
  AlertDialog.Builder builder = new AlertDialog.Builder(Tweaks.this);
  builder.setTitle("Select a size");
  builder.setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
  public void onClick(DialogInterface dialog, int item) {
      if(items[item] == "12m"){
      Toast.makeText(this, "your size is 12", Toast.LENGTH_SHORT).show();
      }
      if(items[item] == "16m"){
      Toast.makeText(this, "your size is 16", Toast.LENGTH_SHORT).show();
      }
      if(items[item] == "20m"){
      Toast.makeText(this, "your size is 20", Toast.LENGTH_SHORT).show();
      }
  }
  })
      .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int id) {
      dialog.cancel();
      }
  }).show();
  </code></pre>
  
  <p>Thank you for any help</p>