Fix not going back on child fragments
This commit is contained in:
parent
0d1b9c4c55
commit
98e75fc313
|
@ -648,6 +648,8 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if(isDrawerOpen()) {
|
if(isDrawerOpen()) {
|
||||||
drawerLayout.closeDrawer(navDrawer);
|
drawerLayout.closeDrawer(navDrawer);
|
||||||
|
} else if(getSupportFragmentManager().getBackStackEntryCount() != 0) {
|
||||||
|
super.onBackPressed();
|
||||||
} else {
|
} else {
|
||||||
switch (UserPreferences.getBackButtonBehavior()) {
|
switch (UserPreferences.getBackButtonBehavior()) {
|
||||||
case OPEN_DRAWER:
|
case OPEN_DRAWER:
|
||||||
|
|
Loading…
Reference in New Issue