scroll to the first new entry when loading more headlines
This commit is contained in:
parent
e02e76bf6f
commit
5b0c674f2b
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user