I want to add Pattern 6: QuickActions from android's blog to my app.
Any code snippet?
Anyone try to do it already?
Should this work on android 1.5?
I want to add Pattern 6: QuickActions from android's blog to my app.
Any code snippet?
Anyone try to do it already?
Should this work on android 1.5?
That app is going to be open sourced at some point so you may want to wait until then. But it could be done with a dialog with a custom background drawable, and using Window.LayoutParams to position the dialog.
Look at line 1310 of ContactsListActivity.java from the Contacts application. It's the code that creates the intent for the contact shortcuts on the home screen that launch the quick actions intent for a contact.
This won't work before eclair.
I just found this question right after I posted my own question/answer. Here's the code I developed for this. http://code.google.com/p/simple-quickactions/
I also have been searching for this and found someone through the wave of the Google IO session who has implemented such thing. He posted his Code on github. I just tested it, and it works just great! Here's the link: http://github.com/ruqqq/WorldHeritageSite/blob/master/src/sg/ruqqq/WHSFinder/QuickActionWindow.java You'll also need some ressources from the project (drawables, styles..).
Till the official Twitter app is open sourced by Google, you may want to take a look at this implementation: http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Really easy to use and works great.