diff options
author | Andrew Dolgov <[email protected]> | 2017-06-05 11:53:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-05 11:53:49 +0300 |
commit | 4e2de4fa87892afcb47351af31293cb1d3c50d64 (patch) | |
tree | ec56709c60a2144d2835b41d13ccf31dc1fd0ec1 /org.fox.ttrss/src | |
parent | 109e86b3885dd2564aae94cb9803fe364b95a358 (diff) |
when scrolling headlines hide toolbar based on px not items scrolled
Diffstat (limited to 'org.fox.ttrss/src')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index c0967651..644fa2a7 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -116,7 +116,6 @@ public class HeadlinesFragment extends Fragment { private SwipeRefreshLayout m_swipeLayout; private int m_maxImageSize = 0; private boolean m_compactLayoutMode = false; - private int m_listPreviousVisibleItem; private RecyclerView m_list; private LinearLayoutManager m_layoutManager; @@ -510,18 +509,13 @@ public class HeadlinesFragment extends Fragment { } } - if (!m_activity.isTablet()) { - if (m_adapter.getItemCount() > 0) { - if (firstVisibleItem > m_listPreviousVisibleItem) { - m_activity.getSupportActionBar().hide(); - } else if (firstVisibleItem < m_listPreviousVisibleItem) { - m_activity.getSupportActionBar().show(); - } + if (!m_activity.isTablet() && m_articles.size() > 0) { + if (dy > 0) { + m_activity.getSupportActionBar().hide(); } else { m_activity.getSupportActionBar().show(); } - m_listPreviousVisibleItem = firstVisibleItem; } //Log.d(TAG, "onScrolled: " + m_refreshInProgress + " " + m_lazyLoadDisabled + " " + lastVisibleItem + " " + m_articles.size()); |