tags:

views:

943

answers:

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?

+2  A: 

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.

BrennaSoft
Here we are almost a year later...
schwiz
+3  A: 

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.

joeo
+6  A: 

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/

Qberticus
+3  A: 

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..).

Hameno
I am trying to utilize some of the code from the link that you posted above within my application and am finding it difficult to understand how to do this. Any ideas how to implement the QuickActionWindow and QuickActionItem with other code?
taraloca
Take a look at http://github.com/ruqqq/WorldHeritageSite/blob/master/src/sg/ruqqq/WHSFinder/WHSListActivity.javaLines 123-204.It is really easy to use...
Hameno
A: 

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.

Juri