コード例 #1
0
  private void showDialog(Bundle state) {
    final Context context = getContext();

    Dialog dialog = mDialog = new ThemePreferencePreview(context);
    dialog.setOnDismissListener(this);
    if (state != null) {
      dialog.onRestoreInstanceState(state);
    }
    dialog.show();
  }
コード例 #2
0
 @Override
 public void onRestoreInstanceState(Bundle savedInstanceState) {
   super.onRestoreInstanceState(savedInstanceState);
   mTitle = savedInstanceState.getString(STATE_TITLE);
   mUrl = savedInstanceState.getString(STATE_URL);
   mSummary = savedInstanceState.getString(STATE_SUMMARY);
   mContent = savedInstanceState.getString(STATE_CONTENT);
   mFeed = savedInstanceState.getString(STATE_FEED);
   updateViews();
 }
コード例 #3
0
 @Override
 public void onRestoreInstanceState(Bundle savedInstanceState) {
   super.onRestoreInstanceState(savedInstanceState);
   mOldColor.setColor(savedInstanceState.getInt("old_color"));
   mColorPicker.setColor(savedInstanceState.getInt("new_color"), true);
 }