views:

485

answers:

2

I noticed that when I swipe my finger from left to right across a home screen widget, in simulator on a AVD, Android switch to the left home screen.

I was wondering if its possible to prevent this behavior and allow home screen gadgets to listen and react to finger gestures (like swipe)? Its very critical for my widget UI design.

Thanks!

+2  A: 

I was wondering if its possible to prevent this behavior and allow home screen gadgets to listen and react to finger gestures (like swipe)?

Only if you write your own home screen and have the "widgets" just be features of the home screen. The only input an app widget can respond to is a simple screen tap (a.k.a., "click").

CommonsWare
wow... thats very limiting..too bad :/thanks
eyalw
+3  A: 

Sorry I am posting this reply as a separate answer because it wouldn't fit as a comment. :)

So interaction with widgets is very limited.

The thing is, widgets aren't "mini applications," they are... widgets. They live in the world of, and are dependent upon, the real application containing them.

There is a continual demand for widgets to support more and more complicated interactions, but every time we start down that path it ends up making the interaction with the containing application much more complicated as well, and seems likely to negatively impact overall usability.

For example, if widgets can process swipes, then the user is now very uncertain about how they can swipe between screens because they will get different behavior depending where they swipe. They could even get stuck in a state where it is nearly impossible to swipe between screens because of the widgets covering the touchable area.

So the way I would recommend thinking of widgets is as a window into the key information associated with your app, to jump into more details of that information by tapping on the widget and switching to the app, and possibly some additional buttons to perform key operations.

Also as of 2.0, with the new wallpaper themes, you can make the UI of the activity that the user visits from your widget sit on top of the same wallpaper as home. This makes the switch between it and home feel much more like an interaction inside of home rather than with another application.

hackbod