Full width home advertisement

Post Page Advertisement [Top]

[Fixed : Android] Detect ScrollView stop scrolling or in scrolling perfect solution.

Hello Devs, 

ScrollView don't provide a method that will tell if ScrollView is in Idle state or in Scrolling State. Still ScrollView provides listeners that will tell the oldScroll Position or Current Scroll Position. When we use tree observer it will tell the scrolling state only.

After mixing of some listeners and customize logic I come across to created a Custom ScrollView that will exactly tell the state of ScrollView, no matter whether scrollView is touching by the user or not.

I have created a Custom View that extends to ScrollView and added a touch event listener to it.

With the help of coroutine and some flag I am able to create a perfect EventScrollView, here it is:

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib