Now admit: reading the Android Interface Guidelines, you didn’t get the idea that this is all, of course, awesome, but do you have to shovel half the styles on old (2.3 <) Androids to look like a Holo interface?

    Or so: in the last Android there is just an awesome feature, but do you need to use it?

    The very first thing that comes to mind: ActionBar and ActionBarSherlock.
    ABS is great, but you can't get by with an ActionBar alone. We want a Holo theme, not just a Holo bar, damn it.

    Oh, such an attractive ActionMode on the lists, what’s worth ...

    Let me introduce you HoloEverywhere - a project whose goal is to port Holo style, Holo widgets and other chips to Android 1.6 and older.

    All these screenshots were taken on Android 2.1 (the minimum Android version for ABS, but HoloEverywhere also works on 1.6 with ABS disabled).

    Actually, what has already been done:
    • Many widgets are styled, such as Button, ToggleButton, RadioButton, CheckBox, Spinner, (Multi) AutoCompleteTextView, RatingBar, ProgressBar, SeekBar and other derivatives. There are also ported ones: Switch, NumberPicker, CalendarView, DatePicker, TimePicker
    • Ported AlertDialog, ProgressDialog, styled the regular Dialog (unfortunately, the AlertDialog internals are too closed for easy porting of the theme, I had to drag all its code and create a version incompatible with the standard AlertDialog)
    • The entire Preference Framework is ported, SupportSharedPreferences is created, which can write various Set and JSON objects / arrays (this is already like a bun :)
    • Small bike assistant to switch themes for Activity
    • Everywhere you use another bike of your LayoutInflater, which can inflate your views with a short name. For example, earlier you wrote this:

      And now, if you call the correct method with the correct parameters at the start of the application, you can simply write MySuperView, and this will work wherever HE is used (within the current application, of course).
      It also follows from this that you can replace system widgets with your own without changing the layout, including system ones. But if widgets are created from code, there's nothing to be done.
    • Actually, ActionMode, about which I mentioned at the beginning of the post. Augmented ListView implementation, allows you to start ActionMode from ABS

    Project repository: github.com/ChristopheVersieux/HoloEverywhere
    There is the same instruction for connecting to the project.
    Download apk demos.

    In principle, that's all for now, but you can help the project either in the most direct way (fork the project, complete it, send a pull request), open a feature request with a description of a new feature, or send a letter to me in a personal email, finally :)

    Also popular now: