As some of you might have noticed, Android changed the order in which the OK/Cancel buttons are displayed in dialogs after ICS (see this issue). The change might make sense, I’m not contesting it. My question is, how are you guys dealing with applications that support both the new
theme (because of the action bar) and the “original” theme? How can we reconcile the order in our layouts with the order in the Dialog?
I tried looking into the dialog code, but it’s not doing anything special, the order is determined in the layout files (which is styled different for Holo). Has anyone created a fragment or widget that takes this into account?
You can put an alternative layout in
layout-v14with the buttons positioned as in ICS. In fact, that is what lint will advise you to do when you run it on your project. Quote:You can use DialogFragment to create dialogs with custom layouts.