Пример #1
0
  @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();
    }
  }
Пример #2
0
 @Override
 protected void onPause() {
   super.onPause();
   busController.getBus().unregister(this);
 }
Пример #3
0
 @Override
 protected void onResume() {
   super.onResume();
   busController.getBus().register(this);
 }