diff options
author | Andrew Dolgov <[email protected]> | 2014-11-04 12:34:05 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-04 12:34:05 +0400 |
commit | a1ad7e0c41cf9665bfd1711bfbbe539849a35d2e (patch) | |
tree | 62d85f3e9eff4bd7a7b48c9b5a1162bb3598ac90 /org.fox.ttrss/src/main/java | |
parent | 1cfa48c5b98134d64ce1fba9cff00a1a8018c8f3 (diff) |
refine previous a bit
Diffstat (limited to 'org.fox.ttrss/src/main/java')
4 files changed, 19 insertions, 9 deletions
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 d6663116..ea55b5cd 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 @@ -257,7 +257,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe ff.initialize(cat, true); ft.replace(R.id.feeds_fragment, ff, FRAG_FEEDS); - //ft.addToBackStack(null); + ft.addToBackStack(null); ft.commit(); //getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -294,7 +294,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe switch (item.getItemId()) { case android.R.id.home: - onBackPressed(); + //getSupportFragmentManager().popBackStack(); return true; case R.id.show_feeds: setUnreadOnly(!getUnreadOnly()); @@ -310,7 +310,12 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe return super.onOptionsItemSelected(item); } } - + + @Override + public void onBackPressed() { + finish(); + } + @Override protected void loginSuccess(boolean refresh) { initMenu(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index ab54c698..75b6eb94 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -304,7 +304,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh parentBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { - m_activity.onBackPressed(); + m_activity.getSupportFragmentManager().popBackStack(); } }); } else { 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 2df3cb23..2714270e 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 @@ -129,7 +129,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead switch (item.getItemId()) { case android.R.id.home: - onBackPressed(); + //getSupportFragmentManager().popBackStack(); return true; case R.id.show_feeds: setUnreadOnly(!getUnreadOnly()); @@ -206,7 +206,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead ff.initialize(catId, true); ft.replace(R.id.feeds_fragment, ff, FRAG_FEEDS); - //ft.addToBackStack(null); + ft.addToBackStack(null); //getSupportActionBar().setDisplayHomeAsUpEnabled(true); //m_actionbarUpEnabled = true; @@ -215,8 +215,13 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead ft.commit(); } } - - public void onFeedSelected(int feedId) { + + @Override + public void onBackPressed() { + finish(); + } + + public void onFeedSelected(int feedId) { onFeedSelected(feedId, false, true); } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java index 65f34398..ea6e59e3 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java @@ -179,7 +179,7 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene parentBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { - m_activity.onBackPressed(); + m_activity.getSupportFragmentManager().popBackStack(); } }); } else { |