Android Quick Actions UI Pattern
Asked Answered
L

3

100

I'm interested in incorporating the Android UI pattern called "Quick Action". Basically, it's a context menu that doesn't cover up the data that is being acted on. I'd like to implement this but I cannot find some sample code or an API to help me out.

Note this UI pattern is discussed in the YouTube video, http://www.youtube.com/watch?v=M1ZBjlCRfz0#t=15m20s.

Does anyone have an implementation of this or know what Google's standard is for adding this to an application?

Lipetsk answered 17/6, 2010 at 5:42 Comment(4)
Good question. I've been wondering how they do that for the official Twitter app, also.Hyperparathyroidism
Also here is a direct link to that point in the video: youtube.com/watch?v=M1ZBjlCRfz0#t=15m35sHyperparathyroidism
duplicate: #2958360Revoice
play.google.com/store/apps/…Cerussite
D
56

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.

Disjunctive answered 1/9, 2010 at 15:0 Comment(3)
(the official Twitter app is now maintained by Twitter itself...won't be open sourced contrary to what they announced initially)Disjunctive
I have created the quick action bar successfully. Now I want to open a context menu on clicking the buttons on quick action bar. How can I do this?Carissacarita
I noticed this crashes the example when you double click on an icon.Pleven
N
3

Interesting Question. Android uses this pattern in their Contacts-App. You can get the source using git:

git clone git://android.git.kernel.org/platform/packages/apps/Contacts.git

I did this and quickly grepped it, but I didn't get a conclusive result. I think that's done in "Contacts/src/com/android/contacts/ui/QuickContactWindow.java", but I am not completely sure.

I you google for QuickContact android, there are a lot of images that show exactly the kind of menu that you want, so it seems likely that it is indeed called QuickContact in that context.

Looking at the Documentation, I don't see any inherited classes that you could use to do this for something other than contacts.

So, a few starting points, but no solution from me ;-)

Noontime answered 17/6, 2010 at 9:11 Comment(0)
R
3

This open source project has the same look and feel for the quick actions popup as the twitter app:

http://github.com/ruqqq/WorldHeritageSite/tree/master/src/sg/ruqqq/WHSFinder

It helps to download the whole project because you need a number of drawables, images, and other resources from that project.

The main demo class is called WHSListActivity.java. The other classes you need is QuickActionWindow.java, and QuickActionItem.java.

After that, it's really easy and works great. I use it for my apps.

Rabelais answered 23/9, 2010 at 19:22 Comment(1)
Important to note that this library is GPLv3, so if you do not want to open source your whole app, do not use it.Dewayne

© 2022 - 2024 — McMap. All rights reserved.