A
A
Artem2013-04-24 13:54:04
Android
Artem, 2013-04-24 13:54:04

How to disable automatic scrolling of ListView?

There is an application, in it ListView. New rows are often added to this ListView and it scrolls automatically. As a result, reading is sometimes quite stressful ... How can I stop automatic scrolling so that only the user can scroll the list manually?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Ozeransky, 2013-04-24
@KREGI

listView.setScrollContainer(false);
or
listView.setOverScrollMode(View.OVER_SCROLL_NEVER);
m?

A
anmipo, 2013-04-24
@anmipo

stackoverflow.com/questions/7637239/disable-scrolling-in-listview-on-refresh

A
Alexey, 2013-04-24
@alexxxst

Before adding to the list, do this:

Parcelable state = list.onSaveInstanceState();

After the update, we return everything to its place:
list.onRestoreInstanceState(state);

M
Marat S, 2014-07-12
@aratj

play around with these options in the listview
android:transcriptMode="alwaysScroll"
listview.setSelection( position );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question