title: Radio button state not saving
body: <p>this is my code for displaying color for drawn analog clock,for this i have used rado group and used it through shared prefence in my live wallpaper,what ever the color i clicked is successfully applying to the clock, but the problem is after closing and again when returned to colorpicking window previous radio button state is not saved,can any one please help me to rectify the error  </p>
  
  <pre><code>protected void onDialogClosed(boolean flag) {
      flag1=flag;
      super.onDialogClosed(flag1);
      if (flag1) {
          android.content.SharedPreferences.Editor editor = getEditor();
          saveRadioButton(editor, 0x7f080001, 0xffffff);
          saveRadioButton(editor, 0x7f080002, 0xc0c0c0);
          saveRadioButton(editor, 0x7f080003, 0x808080);
          saveRadioButton(editor, 0x7f080004, 0xff0000);
          saveRadioButton(editor, 0x7f080005, 0xff8000);
          saveRadioButton(editor, 0x7f080006, 0xffff00);
          saveRadioButton(editor, 0x7f080007, 0x80ff00);
          saveRadioButton(editor, 0x7f080008, 65280);
          saveRadioButton(editor, 0x7f080009, 65408);
          saveRadioButton(editor, 0x7f08000a, 65535);
          saveRadioButton(editor, 0x7f08000b, 33023);
          saveRadioButton(editor, 0x7f08000c, 255);
          saveRadioButton(editor, 0x7f08000d, 0x8000ff);
          saveRadioButton(editor, 0x7f08000e, 0xff00ff);
          saveRadioButton(editor, 0x7f08000f, 0xff0080);
          editor.commit();
      }
  }
  
  protected void saveRadioButton(android.content.SharedPreferences.Editor editor, int i, int j) {
  
      if (((RadioButton)mainView.findViewById(i)).isChecked()) {
          editor.putInt(getKey(), j);
      }
  
  }
  </code></pre>