@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mUserInfo = UserInfo.load(this); setContentView(R.layout.activity_account); mUsername = (TextView) findViewById(R.id.form_username); mEmail = (TextView) findViewById(R.id.form_email); mLogout = (Button) findViewById(R.id.logout); mLogout.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { mUserInfo.logout().save(AccountActivity.this); finish(); } }); mUsername.setText(mUserInfo.username); mEmail.setText(mUserInfo.email); getSupportActionBar().setDisplayHomeAsUpEnabled(true); }
public void finish() { super.finish(); AnimHelper.onFinish(this); }