@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.account_setup_account_type); ((Button) findViewById(R.id.pop)).setOnClickListener(this); ((Button) findViewById(R.id.imap)).setOnClickListener(this); ((Button) findViewById(R.id.webdav)).setOnClickListener(this); String accountUuid = getIntent().getStringExtra(EXTRA_ACCOUNT); mAccount = Preferences.getPreferences(this).getAccount(accountUuid); mMakeDefault = getIntent().getBooleanExtra(EXTRA_MAKE_DEFAULT, false); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String accountUuid = getIntent().getStringExtra("account"); mAccount = Preferences.getPreferences(this).getAccount(accountUuid); setContentView(R.layout.encryption_pin); this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); if (savedInstanceState != null && savedInstanceState.containsKey(EXTRA_ACCOUNT)) { accountUuid = savedInstanceState.getString(EXTRA_ACCOUNT); mAccount = Preferences.getPreferences(this).getAccount(accountUuid); } pinStatus = (TextView) findViewById(R.id.pin_status); firstPin = (EditText) findViewById(R.id.pin); firstPin.setInputType(InputType.TYPE_CLASS_PHONE); firstPin.setTransformationMethod( android.text.method.PasswordTransformationMethod.getInstance()); confirmPin = (EditText) findViewById(R.id.confirm_pin); confirmPin.setInputType(InputType.TYPE_CLASS_PHONE); confirmPin.setTransformationMethod( android.text.method.PasswordTransformationMethod.getInstance()); nextButton = (Button) findViewById(R.id.next); nextButton.setOnClickListener(this); nextButton.setEnabled(true); deleteButton = (Button) findViewById(R.id.delete_pin); deleteButton.setOnClickListener(this); deleteButton.setEnabled(false); // If pin exists, enable delete button and disable next button if (Hash.pinExists(this, mAccount.getEmail())) { nextButton.setEnabled(false); deleteButton.setEnabled(true); } redraw(); }
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(EXTRA_ACCOUNT, mAccount.getUuid()); }
@Override public void onResume() { super.onResume(); }