diff options
author | Andrew Dolgov <[email protected]> | 2014-11-06 19:08:52 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-06 19:08:52 +0300 |
commit | fe3e40d236eec8280bdae265cf27ba3848e2df6c (patch) | |
tree | e6a4a3643769a0b92e1a829d7e6f4c8f47b8ef9e /org.fox.ttrss | |
parent | 6be9af46004d4d8bcb39fcca0a119754434b96cd (diff) |
disable view_selected for feed/cats fragments in small screen mode because of issues when navigating back while not replacing the headlines view content
Diffstat (limited to 'org.fox.ttrss')
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java | 2 | ||||
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java index 40199afd..bb64e9db 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -438,7 +438,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe public int getItemViewType(int position) { FeedCategory cat = items.get(position); - if (m_selectedCat != null && cat.id == m_selectedCat.id) { + if (!m_activity.isSmallScreen() && m_selectedCat != null && cat.id == m_selectedCat.id) { return VIEW_SELECTED; } else { return VIEW_NORMAL; 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 f111a126..2a0a2126 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 @@ -594,8 +594,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh public static final int VIEW_NORMAL = 0; public static final int VIEW_SELECTED = 1; - //public static final int VIEW_GOBACK = 2; - + public static final int VIEW_COUNT = VIEW_SELECTED+1; public FeedListAdapter(Context context, int textViewResourceId, ArrayList<Feed> items) { @@ -611,9 +610,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh public int getItemViewType(int position) { Feed feed = items.get(position); - /* if (m_enableParentBtn && position == 0) { - return VIEW_GOBACK; - } else */ if (m_selectedFeed != null && feed.id == m_selectedFeed.id) { + if (!m_activity.isSmallScreen() && m_selectedFeed != null && feed.id == m_selectedFeed.id) { return VIEW_SELECTED; } else { return VIEW_NORMAL; @@ -630,8 +627,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh int layoutId = R.layout.feeds_row; switch (getItemViewType(position)) { - /* case VIEW_GOBACK: - layoutId = R.layout.feeds_goback; */ case VIEW_SELECTED: layoutId = R.layout.feeds_row_selected; break; |