React to widget clicks

2018-05-09 1 min read
WIDGET

Widgets are simply views (i.e. my app is only drawing it) and everything else (clicks, opening the app, whatever else) is happening in the other app. My app only tells the other app how much space it has to draw the widget and does not know what it draws (is it an image, a button, …). Also my app does not know if the widget handles a touch, all my app knows is “widget was touched”. Everything else is happening in the widgets app.

In a normal launcher, the widget is drawn on a home screen and must not know what happens - any app or dialog will always show above the widget.

Sadly, in this app, this has the side effect that you just have to live with the behaviour that you must close the widget yourself if a widget touch results in opening the widgets app or similar, because it does not make sense to always close the widget if you touch it (think about scrollable widgets e.g.)