I am developing a android application.i am using action-bar in my app.but its not working in my Android smartphone(2.2.3) crashing. give me the solution.
Asked
Active
Viewed 98 times
1
-
Use ActionbarCompat or Actionbarsherlock library ;-) – nbe_42 Jan 24 '14 at 09:46
-
1ActionBarSherlock is no longer updated, the author advice dev to start using ActionBarCompat ;) – An-droid Jan 24 '14 at 09:54
2 Answers
0
Use actionbar sherlock for supporting lower versions too.. follow this
Here is how to use ActionBarSherlock:
Download the ActionBarSherlock here.
Assuming you're using Eclipse IDE, right click your Project, click Properties, then Android. At the bottom, in Layout, Add ActionBarSherlock.
Make sure ActionBarSherlock and your Project are in the same directory.
Extend your classes to Sherlock naming. For example, instead of Activity, change it to Sherlock Activity. The main documentation of ActionBarSherlock is found here.
For easier usage of Sherlock, create util methods in changing the Sherlock names and modifying it.

Shailendra Madda
- 20,649
- 15
- 100
- 138
0
If you just need to know ocally the android version and act according to it :
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1) {
// do something
}
else {
// do something else
}

An-droid
- 6,433
- 9
- 48
- 93