Recover enabled state of submit button after config change

This commit is contained in:
str4d
2014-03-03 04:38:12 +00:00
parent 36eb4a7caa
commit 85dab31237

View File

@@ -76,6 +76,12 @@ public class SetPasswordFragment extends Fragment {
mSubmit = (Button) view.findViewById(R.id.submit_password);
mError = (TextView) view.findViewById(R.id.error);
// If task is running, disable the submit button.
PasswordWaiterFrag f = (PasswordWaiterFrag) mFM.findFragmentByTag(PASSWORD_WAITER_TAG);
if (f != null) {
mSubmit.setEnabled(false);
}
mSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {