If anyone hasn’t had a look at the official Twitter app on Android yet it’s well worth a look. It’s one of the best designed applications on the Android platform and shows what all applications should be like.
There is one part of the app I really like: the Quick Actions menus.
Quick Actions first come about in Android with the introduction of Quick Contacts. Normally you press on the avatar of a contact and a Quick Content box will open listing all the different actions you can take to do with that contact (Email, message, call etc.).
In the Twitter app they are used as a replacement for the long press on list items by pressing on the more arrow on the right of each tweet, and as a replacement for tabs using a drop down menu in the top left.
Unfortunately there is no code in the android SDK to make implementing Quick Content boxes simple, you basically have to roll your own. This is what I thought until I stumbled across a great project on Google Code called simple-quickactions. As should be obvious from the name, it provides a way of implementing Quick Content very simply as most of the code has been written before. The style of the boxes is just plain but this allows you to easily customise it to fit in with the rest of your application.
The best bit is it will work on Android 1.5 and above with very minor modifications. All I had to be was remove the @Override annotations, but I think there will be a better way to modify it to work.
I’ll be using these in an upcoming project of mine and I look forward to seeing how many other apps start making use of this great UI pattern.