How to know when gallery widget stop scrolling?

2019-05-11 00:10发布

问题:

I need to start a process only when the gallery stop scrolling. "onItemSelected" doesn't cut it as it will be called continuously as if scroll by.

So how to detect or callback when the gallery stop scrolling?

回答1:

You can tune the behaviour of the galleryview a little bit with calling setCallbackDuringFling(false). This should limit the calls to onItemSelected to cases where the user stopped scrolling.