use of net.iGap.fragments.FragmentActivation in project iGap-Android by KianIranian-STDG.
the class ActivityRegistration method onBackPressed.
@Override
public void onBackPressed() {
Log.wtf(this.getClass().getName(), "onBackPressed 0");
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.registrationFrame);
if (!(fragment instanceof FragmentActivation) && !(fragment instanceof FragmentRegistrationNickname)) {
if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
Log.wtf(this.getClass().getName(), "onBackPressed");
super.onBackPressed();
} else {
if (getIntent().getBooleanExtra("add account", false)) {
new AccountHelper().changeAccount();
Log.wtf(this.getClass().getName(), "current user: " + AccountManager.getInstance().getCurrentUser());
finish();
startActivity(new Intent(this, ActivityMain.class));
} else {
Log.wtf(this.getClass().getName(), "finish");
finish();
}
}
}
}
Aggregations