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
|
@Override
|
||||||
public void onBackPressed() {
|
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
|
@Override
|
||||||
|
@ -264,7 +264,13 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
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) {
|
public void onFeedSelected(int feedId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user