There are many examples if you google for the “Android widget tutorial”. Two that I found helpful were:
- HelloWidget from TheSmilingBlog. The basic tutorial for displaying an empty box with two buttons.
- Create a Home Screen widget from developer.com. A more complex example is when it displays a random image selected from its collection, with instructions on how to set the update time, as well as buttons on widgets. EDIT:. It turned out that the buttons in the widgets are actually in the continuation of this tutorial and can be found here .
- (I suppose you also read the official tutorial on the Android Developer website).
source share