diff options
author | Andrew Dolgov <[email protected]> | 2011-11-26 10:40:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-11-26 10:40:35 +0300 |
commit | 5b0c674f2bba0c0e5a7fc016b7a003d133d0cd0e (patch) | |
tree | 77c890fede2cbb34e1e3e8f23f80b3c4bb566559 /src | |
parent | e02e76bf6f33cd9f0be060f160fac83f2a992633 (diff) |
scroll to the first new entry when loading more headlines
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/HeadlinesFragment.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index f3790ec9..f8159dad 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -191,11 +191,19 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener { if (m_offset == 0)
m_articles.clear();
+ int last_position = m_articles.size();
+
for (Article f : articles)
m_articles.add(f);
m_adapter.notifyDataSetChanged();
+ ListView list = (ListView)getView().findViewById(R.id.headlines);
+
+ if (list != null) {
+ list.setSelection(last_position+1);
+ }
+
showLoading(false);
}
});
|