@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); fragmentManager = getSupportFragmentManager(); if (loginController.getUser() == null) { Fragment fragment = new LoginFragment(); fragmentManager.beginTransaction().replace(R.id.fragmentRoot, fragment).commit(); } else { // startQuestionFragment(); startQuestionActivity(); } }
@Override protected void onPause() { super.onPause(); busController.getBus().unregister(this); }
@Override protected void onResume() { super.onResume(); busController.getBus().register(this); }