views:

97

answers:

1

How can i set the onScrollStateChanged method for the Android Gallery Widget?

I would like to do something if the scrolling is finished.

A: 

I couldn't find exactly what you are looking for, but I would try using Gallery's onScroll method:

public boolean onScroll 
  (MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)

The last onScroll call, e2.getAction() should be equal to MotionEvent.ACTION_UP

Macarse
unfortunately that doesn't work
Android-Dev
@Android-Dev: why?
Macarse
Scroll states and motion events are two different things. I think the gallery widget should implement the interface onScrollStateChanged or i have to do so but i don't know how to connect the interface implementation to the view.
Android-Dev
@Android-Dev: yep, but AFAIK it doesn't :(
Macarse