tags:

views:

19

answers:

0

Hello. I'm using a GalleryView to flip through days of a calendar (Populating it with LinearLayout instead of ImageView). I've implemented the onItemSelected() callback within setOnItemSelectedListener(). I've set setCallbackDuringFling() to true.

As the user flings, my callback is successfully called for each selection. So far, all is great, but here is my problem: I need to know when the flinging stops. In other words, I need to know the FINAL selection.

Setting setCallbackDuringFling() to false achieves this because the callback is only called on the final selection. But I need setCallbackDuringFling() to be true so that I can update the screen. So, my question is this: Can I detect when the flinging has stopped? Alternatively, does the fling mechanism know the final selection even before the fling-animation stops (does it know where its going to 'land' before it lands)?

Any help would be appreciated, thanks in advance...