Christopher Hackl
Christopher Hackl

Reputation: 193

Android ScrollView, check if currently scrolling

Is there a way to check if a standard ScrollView is currently being scrolled?

Doesn't matter if the direction is upwards or downwards, i only need to check whether it's currently being scrolled at all.

Upvotes: 2

Views: 3214

Answers (1)

Yash Sampat
Yash Sampat

Reputation: 30611

ScrollView in its current form does not provide a callback for detecting scroll events. There are two workarounds available:

1. Use a ListView and implement OnScrollListener.

2. Derive a custom class from the existing ScrollView implementation and extend it to provide callbacks for scroll events.

Upvotes: 2

Related Questions