revert to previous back button handling but check whether backstack is not empty to prevent inability to exit the app
This commit is contained in:
parent
a509415720
commit
b171b64d51
@ -378,7 +378,13 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
finish();
|
||||
if (m_drawerLayout != null && !m_drawerLayout.isDrawerOpen(Gravity.START) &&
|
||||
getSupportFragmentManager().getBackStackEntryCount() > 0) {
|
||||
|
||||
m_drawerLayout.openDrawer(Gravity.START);
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -264,7 +264,13 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
finish();
|
||||
if (m_drawerLayout != null && !m_drawerLayout.isDrawerOpen(Gravity.START) &&
|
||||
getSupportFragmentManager().getBackStackEntryCount() > 0) {
|
||||
|
||||
m_drawerLayout.openDrawer(Gravity.START);
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
public void onFeedSelected(int feedId) {
|
||||
|
Loading…
Reference in New Issue
Block a user