Bringing Holo Theme from Android 4.1 to 2.1 and above.
How to use? (Maven)
- You should clone git repo, init and update submodules:
git clone --branch stable git://github.com/ChristopheVersieux/HoloEverywhere.git HoloEverywhere
cd HoloEverywhere
git submodule update --init --recursive
Git will be swear on detached HEAD state, ignore it.
You also may use git GUI programs
-
Import HoloEverywhere from
library
folder and ActionBarSherlock fromcontrib/ActionBarSherlock/library
folder into Eclipse -
Add HoloEverywhere project as library into your project (Properties/Android/Library/Add)
-
Extend the Activities from
org.holoeverywhere.app.***Activity
Example:
import org.holoeverywhere.app.ListActivity;
public class MainActivity extends ListActivity { ...
Also you should cast view to with the same name from package org.holoeverywhere.widget
, if possible. This, for example, ProgressBar and Spinner:
import org.holoeverywhere.widget.ProgressBar;
ProgressBar bar = (ProgressBar) findViewById(R.id.progress_bar);
If you make changes in styles.xml - use the Builder, otherwise pull request will not be accepted. And before commiting your changes check HEAD - it should be reference on master branch.
$ git branch
* master
If you see it:
$ git branch
* (no branch)
master
Your HEAD in detached state. Stash your changes, switch branch and apply stash:
git stash
git checkout master
git stash apply
In demo using music "Winter Dawn" by machinimasound.com. Licensed under Creative Commons "Attribution 3.0"
LGPLv3, full text of license see here