How would I go about supporting this UI on older versions of Android? The tabs, ON/OFF switch buttons and other control styles are not available by default. Should I implement them myself? Is it acceptable to have a 4.0-like layout on older versions of Android (e.g. 2.1)?

Unrelated comment: you may want to style the "Reis plannen" button as a borderless button (see the Android Design site section on Buttons), aligned flush at the bottom of the screen, with centered text (optionally all caps, 12sp)
–
Roman NurikJun 14 '12 at 23:07

That is an excellent idea, I'll be sure to try it out.
–
OvervJun 14 '12 at 23:17

1 Answer
1

Is it acceptable to have a 4.0-like layout on older versions of Android (e.g. 2.1)?

Yes. It's fine, in general, to use Holo styling on earlier versions of the platform. There are certainly elements of the Android 4.0 interaction palette that may be a bit jarring to users at first (for example the contextual action bar), but the Holo visual language is designed with every human in mind, not just the ones with Android 4.0 devices.

Should I implement them myself?

Yes, feel free to do so. The rest of this answer is developer specific, so may be best suited for Stack Overflow.

First, there's at least one open source project I know of that helps with bringing Holo styling to earlier devices, and another very popular one that helps with the action bar and action bar tabs.

If you want to do it yourself, most of the UI elements (buttons, spinners, checkboxes, etc.) are available on earlier versions of the OS. You just need to apply the Holo visual language, which involves copying resources from the framework (<sdk>/platforms/android-15/data/res/...) into your project and getting your <style> definitions right.

Two things to watch out for are tabs (action bar tabs are a 3.0+ feature) and toggle switches (Switch is a 4.0 widget). For tabs, it's fairly easy to create your own using Button widgets (you may want to avoid TabWidget since it's not easy to fully tweak its styling). For toggle switches, you can use a custom-styled ToggleButton or such.

Holo Everywhere doesn't quite cover all Holo styled UI as some are hard-coded into Android widgets (such as ErrorPopup's background resources in TextView/EditText/CheckBox/etc.). For that ErrorPopup problem you can use github.com/coreform/android-formidable-validation to have an alternate ErrorPopup that you do have control of visually.
–
strayaJan 12 '13 at 19:06