Activity

Follow intuitit on Twitter

For Developers

Building Your Home

Building your own Home application is not that hard as you may expect it to be. To warm up, check out an example on official developers site. If you would like to start with the stock Launcher code, I have a modified version working with the public SDK.

Building Animated Widget

Animate your widget in Home++ is quite simple: just send a broadcast intent to Home++ when you want an animation to start, and tell Home++ who you are (the widget id), what animation you got (animation id), and which view you want to animate (the view id). This list of intents provides more details.

A good way to start is checking out this example.

The start and stop buttons control the frame animation of a running horse. The shake button starts a tween animation on the TextView at top.

Building Scrollable Widget

Only supported from 0.8.0.8 on.

Putting a list view into your widget is also quite simple. After Home++ finish rendering your widget, it will send a READY intent directly to your provider (receiver). Then you may reply it with extras like a dummy view id, reference to a list view layout resource, mapping from cursor columns to item child views etc. Upon receiving your reply, Home++ will extract these extras and setup a list view for you.

The basic diagram is

  1. onUpdate is called
  2. Home++ renders your widget
  3. Rendering finished, Home++ send an ACTION_READY intent to your provider
  4. Get this intent and prepare an ACTION_SCROLL_WIDGET_START intent with extras specifying how to build a list view
  5. Send the intent out
  6. Home++ get your reply, extract info, and build the list view
  7. Home++  send an ACTION_FINISH intent to your provider. 

To help you get started, here is the source code of an example scrollable widget.

Recent Posts


Notes

Can't wait what will come up~ We could work together to make it better.

For issues in animated widget development, dev.hpp@intuitit.mobi