The fling animation is automatic with the Gallery class.  If you need
your own (new) widget class, just
make your own MyGallery class which extends Gallery.
Then just overwrite the onFling() method to do whatever you want to
do, and at the end of that method call super.onFling(args).

Jim

On Mar 12, 1:27 pm, Streets Of Boston <[email protected]> wrote:
> Take a look at the GestureDetector class.
>
> - Create an instance of GestureDetector.
> - Handle the onTouch event of your activity.
>   In your onTouch event handler, forward the MotionEvent to this
> GestureDetector instance.
> - Assign a listener to this GestureDetector (one that implements
> onFling, amongst others)
>   Implement the onFling method in your listener to handle flings.
>
> On Mar 12, 1:27 pm, Meryl Silverburgh <[email protected]>
> wrote:
>
>
>
> > Hi,
>
> > Can you please tell me how implement android's Gallery fling action
> > (with the animation) in my own widget?
>
> > Thank you.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to