use of chat.rocket.android.helper.OnBackPressListener in project Rocket.Chat.Android by RocketChat.
the class AbstractFragmentActivity method onBackPress.
protected boolean onBackPress() {
FragmentManager fragmentManager = getSupportFragmentManager();
Fragment fragment = fragmentManager.findFragmentById(getLayoutContainerForFragment());
if (fragment instanceof OnBackPressListener && ((OnBackPressListener) fragment).onBackPressed()) {
return true;
}
if (fragmentManager.getBackStackEntryCount() > 0) {
fragmentManager.popBackStack();
return true;
}
return false;
}
Aggregations