use of com.zhuinden.simplestackdemoexamplefragments.util.FragmentStateChanger in project simple-stack by Zhuinden.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
CustomApplication.get(this).initialize();
CustomApplication.get(this).getComponent().inject(this);
databaseManager.init(this);
backstackDelegate = new BackstackDelegate(null);
//
backstackDelegate.onCreate(//
savedInstanceState, //
getLastCustomNonConfigurationInstance(), HistoryBuilder.single(TasksKey.create()));
backstackHolder.setBackstack(backstackDelegate.getBackstack());
super.onCreate(savedInstanceState);
MainScopeListener mainScopeListener = (MainScopeListener) getSupportFragmentManager().findFragmentByTag("MAIN_SCOPE_LISTENER");
if (mainScopeListener == null) {
mainScopeListener = new MainScopeListener();
getSupportFragmentManager().beginTransaction().add(mainScopeListener, "MAIN_SCOPE_LISTENER").commit();
}
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
this.fragmentStateChanger = new FragmentStateChanger(getSupportFragmentManager(), R.id.root);
mainView.onCreate();
}
Aggregations