use of com.nextcloud.talk.controllers.MagicBottomNavigationController in project talk-android by nextcloud.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
ButterKnife.bind(this);
setSupportActionBar(toolbar);
router = Conductor.attachRouter(this, container, savedInstanceState);
boolean hasDb = true;
try {
sqlCipherDatabaseSource.getWritableDatabase();
} catch (Exception exception) {
hasDb = false;
}
if (!router.hasRootController()) {
if (hasDb) {
if (userUtils.anyUserExists()) {
router.setRoot(RouterTransaction.with(new MagicBottomNavigationController()).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
} else {
router.setRoot(RouterTransaction.with(new ServerSelectionController()).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
}
} else {
router.setRoot(RouterTransaction.with(new ServerSelectionController()).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
}
}
}
Aggregations