Code example for FragmentActivity

Methods: finish, getApplication, onCreate, startActivity

0
 
	private View mActionBarShadow;
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
 
		UserPreferencesHelper preferencesHelper = new UserPreferencesHelper(this);
 
		if (preferencesHelper.isUserDisabled()) {
			((OhmageApplication) getApplication()).resetAll(); 
		} 
 
		if (!AccountHelper.accountExists()) { 
			Log.v(TAG, "no credentials saved, so launch Login");
			startActivity(AccountHelper.getLoginIntent(this));
			finish(); 
			return; 
		} 
	} 
 
	@Override