|
|
@ -609,7 +609,8 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
spProvider.setAdapter(padapter);
|
|
|
|
spProvider.setAdapter(padapter);
|
|
|
|
|
|
|
|
|
|
|
|
if (savedInstanceState == null) {
|
|
|
|
if (savedInstanceState == null) {
|
|
|
|
if (!once) {
|
|
|
|
if (once)
|
|
|
|
|
|
|
|
return;
|
|
|
|
once = true;
|
|
|
|
once = true;
|
|
|
|
|
|
|
|
|
|
|
|
etName.setText(account == null ? null : account.name);
|
|
|
|
etName.setText(account == null ? null : account.name);
|
|
|
@ -619,23 +620,22 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
tilPassword.getEditText().setText(account == null ? null : account.password);
|
|
|
|
tilPassword.getEditText().setText(account == null ? null : account.password);
|
|
|
|
cbSynchronize.setChecked(account == null ? true : account.synchronize);
|
|
|
|
cbSynchronize.setChecked(account == null ? true : account.synchronize);
|
|
|
|
cbPrimary.setChecked(account == null ? true : account.primary);
|
|
|
|
cbPrimary.setChecked(account == null ? true : account.primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
int provider = savedInstanceState.getInt("provider");
|
|
|
|
int provider = savedInstanceState.getInt("provider");
|
|
|
|
spProvider.setTag(provider);
|
|
|
|
spProvider.setTag(provider);
|
|
|
|
spProvider.setSelection(provider);
|
|
|
|
spProvider.setSelection(provider);
|
|
|
|
|
|
|
|
|
|
|
|
tilPassword.getEditText().setText(savedInstanceState.getString("password"));
|
|
|
|
tilPassword.getEditText().setText(savedInstanceState.getString("password"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Helper.setViewsEnabled(view, true);
|
|
|
|
Helper.setViewsEnabled(view, true);
|
|
|
|
|
|
|
|
|
|
|
|
cbPrimary.setEnabled(cbSynchronize.isChecked());
|
|
|
|
cbPrimary.setEnabled(cbSynchronize.isChecked());
|
|
|
|
ibDelete.setVisibility(account == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnCheck.setVisibility(cbSynchronize.isChecked() ? View.VISIBLE : View.GONE);
|
|
|
|
btnCheck.setVisibility(cbSynchronize.isChecked() ? View.VISIBLE : View.GONE);
|
|
|
|
btnSave.setVisibility(cbSynchronize.isChecked() ? View.GONE : View.VISIBLE);
|
|
|
|
btnSave.setVisibility(cbSynchronize.isChecked() ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Consider previous check/save/delete as cancelled
|
|
|
|
|
|
|
|
ibDelete.setVisibility(account == null ? View.GONE : View.VISIBLE);
|
|
|
|
btnCheck.setEnabled(true);
|
|
|
|
btnCheck.setEnabled(true);
|
|
|
|
pbWait.setVisibility(View.GONE);
|
|
|
|
pbWait.setVisibility(View.GONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|