I have a real app - which you can see on the left in the below screenshot.
And I have prepared a very simple test app at GitHub, which you can see at the right:
The real app has a ListView at the bottom, which is filled with Bluetooth-related log messages. This happens pretty often, few times a second and it is impossible for the user to scroll up and look at a particular event - because the list jumps to the bottom by itself, when new events are added to the list.
My question is: How to disable autoscrolling of the ListView
- when user scrolls up and how to enable autoscrolling again, when user scrolls to the bottom?
And here is my very simple test app:
- MainActivity.java (filling the ListView with help of AsyncTask)
- activity_main.xml (layout with Button and ListView)
As you can see the auto-scrolling is currently enabled by XML attributes in layout:
<ListView
android:id="@+id/myListView"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />