QuickActions like the Twitter app

前端 未结 5 1413
情书的邮戳
情书的邮戳 2020-12-12 15:08

I want to add Pattern 6: QuickActions from android\'s blog to my app.

Any code snippet?

Anyone try to do it already?

Shoul

相关标签:
5条回答
  • 2020-12-12 15:40

    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/

    0 讨论(0)
  • 2020-12-12 15:43

    Until the official Twitter app is open sourced by Google, you may want to take a look at this implementation:

    It's really easy to use and works great.

    0 讨论(0)
  • 2020-12-12 15:44

    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.

    0 讨论(0)
  • 2020-12-12 15:51

    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.

    0 讨论(0)
  • 2020-12-12 15:57

    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 the code on GitHub. I just tested it, and it works just great!

    You'll also need some ressources from the project (drawables, styles..).

    0 讨论(0)
提交回复
热议问题