0

I'm programmatically setting scrolled Y coordinate of my ListView to 720pixels. It works fine, but when the user touches the ListView it jumps back to top. No scroll, but I can see the content change and it's at the top of the list. The ListView contains only one item representing hours in a day from 0:00 to 23:00 which I inflate using a custom adapter.

I've tried overriding onScrollChanged, onTouch etc. Nothing works.

The ListView is inflated in the ViewPager's adapter. And it's in there I set the scrollTo property.

Is there any way to stop the ListView from going to the top?

Adrian Heine
  • 4,051
  • 2
  • 30
  • 43
AndroidCoder
  • 302
  • 1
  • 3
  • 13

1 Answers1

-1

Fixed it by using ScrollView instead of ListView as ListView only had 1 item.

AndroidCoder
  • 302
  • 1
  • 3
  • 13