protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
    super.onPrepareDialogBuilder(builder);

    // builder.setPositiveButton(android.R.string.ok, null);
    // builder.setNegativeButton(android.R.string.cancel, null);
    // builder.setMessage(R.string.account_credentials_dialog_mesage);
  }
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   if (savedInstanceState == null) {
     creds = this.getCredentialsPreference().getCreds();
   } else {
     creds = (AccountCredentials) savedInstanceState.getSerializable(SAVE_STATE_TEXT);
   }
 }
 protected void onBindDialogView(View view) {
   super.onBindDialogView(view);
   mUsernameField = (EditText) view.findViewById(R.id.credentials_username);
   mPasswordField = (EditText) view.findViewById(R.id.credentials_password);
   mRealmField = (EditText) view.findViewById(R.id.credentials_realm);
   if (mUsernameField == null) {
     throw new IllegalStateException(
         "Dialog view must contain an EditText with id @id/credentials_username");
   } else if (creds != null) {
     mUsernameField.setText(creds.getUsername());
     mPasswordField.setText(creds.getPassword());
     mRealmField.setText(creds.getRealm());
   }
 }
 public void onSaveInstanceState(@NonNull Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putSerializable(SAVE_STATE_TEXT, creds);
 }