How to implement android's Gallery fling action in my own widget

by Meryl Silverburgh » Fri, 13 Mar 2009 01:27:23 GMT


Sponsored Links
 Hi,

Can you please tell me how implement android's Gallery fling action
(with the animation) in my own widget?

Thank you.

--~--~---------~--~----~------------~-------~--~----~



How to implement android's Gallery fling action in my own widget

by Streets Of Boston » Fri, 13 Mar 2009 03:27:20 GMT


 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:27pm, Meryl Silverburgh <silverburgh.me...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to implement android's Gallery fling action in my own widget

by gymshoe » Fri, 13 Mar 2009 11:17:37 GMT


 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




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. HTTP Client........SocketException

I'm working behind proxy, whenever i send a req using HTTPclient i
get a SocketException........Does anybody knows how to solve this
problem...........
--~--~---------~--~----~------------~-------~--~----~

2. layout editor orientation dropdown.

I would like my application to remain in protrait which i have
achieved by setting the orientation to portrait in the manifest. Is
there a way to ensure that one of my layouts(just one) is only
displayed in landscape mode?
I tried selecting portrait in the orientation dropdown (in the layout
editor) but that didnt seem to do anything. just showed an orange
triangle by the dropdown box.
--~--~---------~--~----~------------~-------~--~----~

3. Is it possible to create an "activity" instance using constructor like a common Java class?

4. Learn Android

5. Getting contact name from contact number from phonebook.

6. for transferring file, is it require any permissions?

7. How to disable Auto-Focus on Camera?