I am using a Gallery
based Cover-flow, as suggested here.
OnFling()
just indicates a single swipe - regardless how many items have shifted.
getSelect开发者_StackOverflow社区edItemPosition()
before and after the swipe doesn't help since I need to do some work on every shift.
It will also be nice while I am at it, to get the direction of the shift - either right or left. If I understand you correctly you should implement this interface and set it to you Gallery with setOnItemSelectedListener
method, also setCallbackDuringFling
might be usefull.
To get fling direction you can save last selected position and compare it with new one.
精彩评论