Before today I would have said this is just not possible, to have an app that runs overlayed on top of everything else: home screens, apps, dialer, etc.
If you try the f
This can be done by a combination of things. The initial button is done by creating a window of type TYPE_SYSTEM_OVERLAY . These windows cannot gain focus, however you can use FLAG_WATCH_OUTSIDE_TOUCH to get touch events and match up the coordinates to realized you've been touched.
Similarly there is http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#TYPE_SYSTEM_ALERT (And TYPE_SYSTEM_DIALOG).
Finally, an activity can be created with http://developer.android.com/reference/android/R.style.html#Theme_Translucent (or variants).