use of co.krypt.krypton.team.onboarding.create.OnboardingCreateFragment in project krypton-android by kryptco.
the class TeamOnboardingActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
CrashReporting.startANRReporting();
setContentView(R.layout.fragment_teams);
if (getIntent() != null && getIntent().getAction() != null) {
onNewIntent(getIntent());
return;
}
Fragment initialFragment = null;
CreateTeamProgress createTeamProgress = new CreateTeamProgress(getApplicationContext());
JoinTeamProgress joinTeamProgress = new JoinTeamProgress(getApplicationContext());
if (createTeamProgress.inProgress()) {
initialFragment = createTeamProgress.currentStage().getFragment();
} else if (joinTeamProgress.inProgress()) {
initialFragment = joinTeamProgress.currentStage().getFragment();
} else {
// default to create team
initialFragment = new OnboardingCreateFragment();
}
getSupportFragmentManager().beginTransaction().add(R.id.fragment_teams, initialFragment).commitAllowingStateLoss();
}
Aggregations