use of james.alarmio.fragments.SplashFragment in project Alarmio by TheAndroidMaster.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
alarmio = (Alarmio) getApplicationContext();
alarmio.setListener(this);
if (savedInstanceState == null) {
fragment = new SplashFragment();
getSupportFragmentManager().beginTransaction().add(R.id.fragment, fragment).commit();
} else {
if (fragment == null)
fragment = new HomeFragment();
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();
}
getSupportFragmentManager().addOnBackStackChangedListener(this);
}
Aggregations