diff options
author | Andrew Dolgov <[email protected]> | 2013-08-26 12:56:06 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-08-26 12:56:06 +0400 |
commit | 5a959002532798ee153b6621e0fe3a23e99b41be (patch) | |
tree | 18331f3eef3645caa01f7dd88550edcabec803b2 /src | |
parent | 84cfc9a9fe71df1649f05149989e8a0faabcca22 (diff) |
scroll to listview top when refreshing headlines (closes #767)
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/HeadlinesFragment.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 42d960bc..63929fa1 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -371,6 +371,15 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, append = false; } + // new stuff may appear on top, scroll back to show it + if (!append) { + if (getView() != null) { + Log.d(TAG, "scroll hack"); + ListView list = (ListView)getView().findViewById(R.id.headlines); + list.smoothScrollToPosition(0); + } + } + final boolean fappend = append; final String sessionId = m_activity.getSessionId(); final boolean isCat = m_feed.is_cat; |