Minilin
Minilin

Reputation: 71

How to scroll listview smoothly to a certain row before SDK 8

I want to programmatically scroll a row to the top of listview, I tried the setSelection method, but no scroll animation how to? please.

Upvotes: 2

Views: 1468

Answers (2)

Glendon Trullinger
Glendon Trullinger

Reputation: 4062

I have not tried this myself, but would simulating touch events work for this?

http://developer.android.com/reference/android/test/TouchUtils.html

Upvotes: 3

Maximus
Maximus

Reputation: 8431

I've searched and searched myself, and I do not believe there is any way to do this before API Level 8. If anyone suggests the View.scrollTo() or View.scrollBy() methods they will not work. Those move the entire View, not the content of the list.

Upvotes: 0

Related Questions