5

I have created an app widget in Android and want to add some gesture-based functionality to it. For e.g: when user swipes up new set of data be displayed. AFAIK, gestures are not supported in AppWidgets and yet I have seen widgets which have similar functionality(e.g. HTC widgets photo album and weather widget).

Please help me out and let men know if I am missing something.

Link to tutorials, documentation or sample code are appreciated.

Thanks.

Samuh
  • 36,316
  • 26
  • 109
  • 116

2 Answers2

4

You cannot respond to gestures in app widgets, sorry. The only interactions presently supported are simple click events.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Hi Mark! Thanks for your reply. Any guesses on how HTC photo album widget and weather widget handle gestures? – Samuh Sep 22 '10 at 11:33
  • 1
    @Samuh: Simple. They're not app widgets. They are part of the home screen application, merely advertised as and configured like app widgets. – CommonsWare Sep 22 '10 at 22:43
  • Games that people play! :) Have a nice day! – Samuh Sep 23 '10 at 06:20
0

There is one case where this happens, the ics unlock screen widget. I hear you, it's not really a homescreen widget, but it is equivalent in the case of widgetlocker. If you could hack that functionality you might have what you need.

I've been thinking about a heavily customized version of this for a while.

heorling
  • 339
  • 6
  • 17