diff options
author | Andrew Dolgov <[email protected]> | 2014-10-31 09:36:45 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-10-31 09:36:45 +0300 |
commit | 0a3a533844f1209b13cd45d961b7de72197d90de (patch) | |
tree | 32e87e58cb93b5212cc38839528fb6396023c5d7 /org.fox.ttrss/src/main | |
parent | b0040b507c43dbd44f5fc1b01661e1ed4abe4e9a (diff) |
open drawer if needed onbackpressed
Diffstat (limited to 'org.fox.ttrss/src/main')
3 files changed, 11 insertions, 37 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 25e2d377..53ecb683 100644 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="251" + android:versionCode="252" android:versionName="1.51" > <uses-sdk diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java index 84332788..de9e07df 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java @@ -293,24 +293,11 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe @Override public void onBackPressed() { - super.onBackPressed(); - - /* if (m_actionbarRevertDepth > 0) { - - if (m_feedIsSelected && m_drawerLayout != null && !m_drawerLayout.isDrawerOpen(Gravity.START)) { - m_drawerLayout.closeDrawers(); - } else { - m_actionbarRevertDepth = m_actionbarRevertDepth - 1; - m_actionbarUpEnabled = m_actionbarRevertDepth > 0; - getSupportActionBar().setDisplayHomeAsUpEnabled(m_actionbarUpEnabled); - - onBackPressed(); - } - } else if (m_slidingMenu != null && !m_slidingMenu.isMenuShowing()) { - m_slidingMenu.showMenu(); - } else { - super.onBackPressed(); - } */ + if (m_drawerLayout != null && !m_drawerLayout.isDrawerOpen(Gravity.START)) { + m_drawerLayout.openDrawer(Gravity.START); + } else { + super.onBackPressed(); + } } @Override diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java index 2dca3c85..28db6ab9 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -123,24 +123,11 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead @Override public void onBackPressed() { - super.onBackPressed(); - - /* if (m_actionbarRevertDepth > 0) { - - if (m_feedIsSelected && m_slidingMenu != null && !m_slidingMenu.isMenuShowing()) { - m_slidingMenu.showMenu(); - } else { - m_actionbarRevertDepth = m_actionbarRevertDepth - 1; - m_actionbarUpEnabled = m_actionbarRevertDepth > 0; - getSupportActionBar().setDisplayHomeAsUpEnabled(m_actionbarUpEnabled); - - onBackPressed(); - } - } else if (m_slidingMenu != null && !m_slidingMenu.isMenuShowing()) { - m_slidingMenu.showMenu(); - } else { - super.onBackPressed(); - } */ + if (m_drawerLayout != null && !m_drawerLayout.isDrawerOpen(Gravity.START)) { + m_drawerLayout.openDrawer(Gravity.START); + } else { + super.onBackPressed(); + } } @Override |