From f2457b4f7cf8aa5f6fcdba10c13bc44b949b0aad Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 25 Jun 2012 14:40:23 +0400 Subject: [PATCH] fragment navigation tweaks --- src/org/fox/ttrss/MainActivity.java | 8 +++++--- src/org/fox/ttrss/offline/OfflineActivity.java | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index d7dbb195..b6f6898e 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -200,7 +200,9 @@ public class MainActivity extends CommonActivity implements OnlineServices { findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE); - ft.replace(R.id.headlines_fragment, new DummyFragment(), ""); + updateHeadlines(); + + //ft.replace(R.id.headlines_fragment, new DummyFragment(), ""); } ft.commit(); @@ -1768,7 +1770,7 @@ public class MainActivity extends CommonActivity implements OnlineServices { m_activeFeed = feed; if (!append) { - m_selectedArticle = null; + //m_selectedArticle = null; if (m_menu != null) { MenuItem search = m_menu.findItem(R.id.search); @@ -1793,7 +1795,7 @@ public class MainActivity extends CommonActivity implements OnlineServices { ft.add(R.id.fragment_container, hf, FRAG_HEADLINES); } else { - findViewById(R.id.article_fragment).setVisibility(View.GONE); + //findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES); } diff --git a/src/org/fox/ttrss/offline/OfflineActivity.java b/src/org/fox/ttrss/offline/OfflineActivity.java index 93ad838d..2d4d4da6 100644 --- a/src/org/fox/ttrss/offline/OfflineActivity.java +++ b/src/org/fox/ttrss/offline/OfflineActivity.java @@ -125,6 +125,7 @@ public class OfflineActivity extends CommonActivity implements @Override public void onItemSelected() { m_selectedArticleId = 0; + m_activeFeedId = 0; FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); @@ -148,7 +149,7 @@ public class OfflineActivity extends CommonActivity implements findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE); //findViewById(R.id.article_fragment).setVisibility(View.GONE); - ft.replace(R.id.headlines_fragment, new DummyFragment(), ""); + //ft.replace(R.id.headlines_fragment, new DummyFragment(), ""); } ft.commit();