Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are Android app widgets (for home screen) allowed gestures?

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.

like image 723
eyalw Avatar asked Jan 30 '10 10:01

eyalw


People also ask

What is the main disadvantage of a home screen application widget?

What is the main disadvantage of a home screen application widget? Common Issues with Android App Widgets There are cases when errors appear when using widgets: they often disappear from your home screen, freeze, or simply don't load.

Are Android widgets interactive?

The most popular uses of widgets for Android are for weather information, an interactive clock on the home screen, reading emails, and quickly checking schedules with the calendar. Regardless of how you use a widget or even if you don't use them, a widget is, in fact, an essential aspect of home screen customization.

Can widgets be customized on Android?

Search for information more quickly with the Google app widget on your Home screen. You can control the color, shape, and transparency of the Search widget that appears on your Android phone or tablet.

Is there a difference between an app and a widget?

Widgets are similar to Apps in that they are both computer programs but unlike apps, widgets do not require the user to click on them in order for the programs to start running. Apps are computer programs that must be downloaded before they can be used.


2 Answers

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.

like image 122
hackbod Avatar answered Oct 22 '22 17:10

hackbod


Starting with API level 11 (Android 3.0.x) you can use "android.widget.RemoteViewsService.RemoteViewsFactory" and and assign a widget to use (from docs):

ListView: A view that shows items in a vertically scrolling list. For an example, see the Gmail app widget.

GridView: A view that shows items in two-dimensional scrolling grid. For an example, see the Bookmarks app widget.

StackView: A stacked card view (kind of like a rolodex), where the user can flick the front card up/down to see the previous/next card, respectively. Examples include the YouTube and Books app widgets.

See http://developer.android.com/guide/topics/appwidgets/index.html section Using App Widgets with Collections.

So yes - if you use one of the above layouts your widget will accept gestures.

like image 28
karel.herink Avatar answered Oct 22 '22 16:10

karel.herink