Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OK / Cancel buttons order in ICS

Since SDK 14, the preferred order is Cancel / OK in opposition to OK / Cancel before. I am NOT going to enter in the debate of whether it is a good o bad idea, this is not the subject of my question.

The thing is that the ADK encourages you to use the new order for devices with SDK >= 14 by giving you the following Lint

Layout uses the wrong button order for API >= 14: Create a layout-v14/layout.xml file with opposite order: Cancel button should be on the left (was "@string/send | Cancel", should be "Cancel | @string/ send")

OK, I will stick to that, this is not a problem for me and I understand that I should follow the advice in order to avoid annoying the users.

But here is the thing... On my Samsung Galaxy S II, running on ICS, the System interface itself seem not to follow the new order. Here are a few screenshot examples:

enter image description here

The order is the old one. Note that I use the official ICS version for my phone (not a custom ROM). And the order is the same on my Galaxy Tab 2 (also running official ICS). On some dialogs, the order is correct (cancel / OK) The only difference I see is the Theme (the dialogs using the Holo theme have the new order; the others, the old order). Here is a screenshot of a DatePickerDialog from the settings (to set the system date) and from my app using Holo:

enter image description here

This is quite disturbing. It looks like the order of the buttons is Theme-related and not version-related. Or is it just Samsung not following Android's design patterns?

I think that Activities (when they have OK / Cancel buttons) should also follow the same order. And here, again, on my phone the Create Event activity of the Calendar has the wrong order (And the activity does not use Hole theme):

enter image description here

I will be using the Holo theme in my app for devices as from Honeycomb anyway, so I will keep the new order for SDK>=14. I just would like to understand this ussue.

Thanks.

like image 400
Benoît Bouré Avatar asked Oct 03 '12 08:10

Benoît Bouré


People also ask

What should a Cancel button do?

What does the Cancel button do exactly? It dismisses the user's current screen and brings them back to their previous screen. This dismissive button is a safeguard to prevent unwanted changes to the system.

Should cancel go on left or right?

In most languages, people are accustomed to read from left side to right side, so it accords with our speech habits to put ok-key on the left side of cancel-key.

Should OK be on the left or right?

Listing OK first supports the natural reading order in English and other languages that read left-to-right. Many other button sets have a natural progression (say, Yes / No or Previous / Next). You should always list these so that the reading order matches the logical order — in this case, OK / Cancel.


1 Answers

Yes, the button swap is quite irritating and i end up hitting cancel more than the ok button. But this is what you can do. Either create your own custom dialog box so that you keep control of which button comes where, else let the user figure out by reading. Only thing we need to do as programmers is so to it that when cancel is pressed, it actually cancels and not OKays! To shed more light on why Ok-Cancel was swapped, this was to avoid Patent infringement with Apple as they too follow Ok-Cancel. So swapping Cancel-Ok would mean no infringement(Silly, but saves Google Millions!)

like image 58
Royston Pinto Avatar answered Oct 31 '22 02:10

Royston Pinto