Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Android Patterns (androidpatterns.com)
147 points by mcgin on Feb 7, 2011 | hide | past | favorite | 42 comments


I just got an Android with that great Virgin Mobile deal, and I was surprised at just how much the Back button is used in almost all contexts. It's severely overloaded: want to get out of an on-screen keyboard? Back. Want to move back a screen? Back, except when it's Google Reader that opened a Browser window, in which case it takes you back to the previous page that Browser had. Back through a menu? Back. Back to a previous page in Browser? Back.

It's as if people just substituted the button for any instance in human language where "back" was used.

What's somewhat interesting is that I found myself wishing that I could just swipe left in order to achieve the same functionality, if I am going to be forced to do it so much. Then I realized Windows Phone 7 uses swipe left as "back" in some contexts. Sometimes you do have to give Microsoft credit :)


> Back, except when it's Google Reader that opened a Browser window, in which case it takes you back to the previous page that Browser had.

Normally apps like Google Reader open new browser windows when links are clicked. When an application's link opens a new window, back closes the window and goes back to the previous application.

However, the browser has a limit of how many windows it can open, so sometimes applications can't open new windows and have to re-use existing ones. In this case, the history of the window is preserved, so back takes you through the timeline.

It's a bit annoying, but the alternative is either (a) delete browser windows without user confirmation or (b) let the browser grow out of control, consuming more and more resources. There are third-party browsers that choose to do (b) but also warn the user and ask them to close tabs themselves, which is probably a better solution.

tl;dr: close your unused browser windows.


The back button was also the most jarring thing for me when I first got an android phone, from memory. The main irritation was when you hit back several times to "close" apps in a chain... until you got the browser, when suddenly it starts going back through your page history. Maddeningly inconsistent.

I do like the (otherwise) universality of it now though.


The inconsistency still infuriates me, even after years.

In most apps the back-button will take you back one screen or close the app when you're on the "app home" screen. This overload makes it difficult to predict which of the two will actually happen. And the penalty of a mistap (app closes, has to be reopened) is big enough to turn it into a permanent annoyance. I'm closing apps by accident all the time.

And then don't get me started on the apps that break with the pattern altogether (browser and many games) which have to be exited with the "home"-key or some menu function.


Or it could close windows but save their history and revive them as needed.


I love the back button, and I love how easy it is to get out of whatever I am doing.


"Back" to some random place most of the time.

1. receive email notification for two messages.

2. click notification bar

3. go to gmail app.

4. open first message and click a link.

5. you are now in the browser. (clicking back will close the window, but you want to read it later!)

6. you long press HOME button (hoping to select gmail and read the other message)

7. gmail is not in the open app list (WTH?!)\

8. you curse, click home, find the gmail app, click it.

9. now you are on the message with the link

10. press BACK

11. now you are on the message list (aha! not you home screen you came from!)

12. click the 2nd message and read it

(edit: how do you make new lines without being forced to make paragraphs?)


Actually step seven is "add to instafetch",

but yeah, it isn't perfect.


I gradually realized that I treat the Back button as a game. I have no idea where it will take me, so whenever I don't like what's on the screen and want to be "somewhere else", I just push the back button until I see something better, or I'm on the home screen. It's kinda fun, but very bad design :-)


Why is it bad design? Have you ever expected it to do something, and it didn't?


Sometimes the back button just closes a sub-menu, sometimes it will close the whole menu. Often, the back button will drop me back at the main screen for the app instead of the place in the app I had come from. Sometimes I hit the back button by accident and there's no way to go "forward".

ETA since this happened to me: A notification will jump me into the middle of an app, like voicemail. Sometimes the back button will send me to the main page of the app instead of back where I was before the notification.


That is pretty bad!


I never really had a problem with the universal back button. The app development on Android is very similar to web development. I'm used to using the back button often on my browser, it seems only natural to do it on my phone as well.


Back is great, but I wish there was a soft back.

Currently if you press home enough, you'll leave the app and probably go to the home screen. That's not friendly.

My idea for default behaviour would be the soft back: Takes you back through the app you're using, but won't leave the app. If you press back when you're as far back in the app as possible, you'd get a notification (vibration, LED flash, beep). Press back one more time (or twice) and you'd leave the app to whatever app you were on earlier.

Or simply disable backing out of an app and let the user press Home to return to the home screen, or hold down Home to bring up the multitasking menu.


If you press back when you're as far back in the app as possible, you'd get a notification (vibration, LED flash, beep). Press back one more time (or twice) and you'd leave the app to whatever app you were on earlier.

:set noerrorbells novisualbell

Don't flash, blink buzz or beep at me when nothing is wrong. Grr.


Perhaps, but when you try to scroll past the end of a list in Android (at least in the ROM I'm using) you get a bounce and a horizontal line indicating that you're at the end of a list and can go no further. That's more what I had in mind.


I've had a Nexus S for a few now and find myself thinking the same. It feels like Android needs a good alt-tab like task switcher, which would reduce reliance on Back for a lot of things. Haven't found one in the app market so far.


You mean aside from the press-and-hold on the Home button?


The press-and-hold is also way too slow.

The functionality should be reversed; long-press takes you to the homescreen, tap takes you to the app switcher. It might be more confusing to new users, but much more adequate in daily use.


That shows the 'Recent' list, which doesn't seem to be the same apps listed as still running in the/a Task Killer.


The Palm Pre uses a left swipe for the back gesture. I'm unsure if that in turn was based on something else.


What's the virgin mobile deal?



This is amazing. Google's UI guidelines are severely lacking, so far I've just been looking at other Android apps for some guidance, and many of them are just kind of loosely based on existing iPhone apps. Hope this site continues to improve!


Adding code samples (java & layouts) would be even more awesome. Very interesting, still.


They should make that part social - let devs upload their own, rate them, etc. Github for Android patterns, sort of.


We (Unitid / androidpatterns.com) like that idea. Maybe you (this group) can help us implement it.

Looking forward to your suggestions!


How many of these UI patterns are already codified in Android's app framework? It would be cool if these identified patterns were presented in a mini-framework.


Yes. UI is one thing, but many devs out there are using these patterns and everyone reinvents the wheel to implement them.


Android Patterns does a good job of presenting the basics.

I have the HTC Evo and the Android 2.0 software beats anything else I've ever used. The top 3 rated phones on PCworld are all ran by Android 2.0 software (with iPhone coming in fourth place).

Also, for all you app developers out there, development in 2.0 is your best bet. Androids still have less apps out there compared with iPhone OS at this stage, so you'll have a little less competition to deal with.


it's like the HIG for android - cool....linking these to code samples for each pattern could render a very cool manual for android development :)


I was looking for something like this the other day, thanks.


This is a great resource for commonly observed interface conventions. It seems many applications have been ported from iOS to Android and the UI has not been changed that much. While there are a lot of good interface techniques are shared by Android and iOS there are also many differences how Android and iOS applications are used.


Awesome. I'm developing my first Android app and this should prove to be very helpful.


For anyone interested in the iOS equivalent look here: http://bit.ly/Apple_IOS_HIG



Looks like this was done using Balsamiq. Definitely a handy tool for any designer!


No not Balsamiq.

Actually we used Mike Clarke's stencils (http://graffletopia.com/stencils/578) as a valuable base. We added a little and converted it to a 'stencil' for FireWorks.

You can downlaod the toolkit for free at the site. Use it as you like. And of course we will be extremely happy if you add / shareone new android pattern ;-).


Wonderfully done. Thanks!


As an iOS user developing for Android, this is awesome. Thanks!


Is there an iOS equivalent of this info?


Yes, it's called the Apple HIG. http://developer.apple.com/library/ios/#documentation/UserEx...

The nice part about the Apple version is that if you don't follow it your app doesn't make it into the store.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: