Reputation: 17037
Is there action bar for Android Level 7 or something else that I can use as action bar? I need to build an app which is using action bar for Android 2.1
Upvotes: 7
Views: 8290
Reputation: 2411
In July 2013 Google added action bar compatibility back to 2.1 (7+) in New "v7 appcompat library"
http://developer.android.com/tools/support-library/index.html
Upvotes: 0
Reputation: 8225
JohanNilsson has actually created a ActionBar
library which is available on GitHub.
Upvotes: 12
Reputation: 31
TypedArray a = mActivity.getTheme().obtainStyledAttributes(R.style.AppTheme, new int[] {
R.attr.actionbarCompatItemHomeStyle,
R.attr.actionbarCompatItemStyle
});
int actionbarCompatItemHomeStyle = a.getResourceId(0, 0);
int actionbarCompatItemStyle = a.getResourceId(1, 0);
ImageButton actionButton = new ImageButton(mActivity, null,
itemId == android.R.id.home ? actionbarCompatItemHomeStyle : actionbarCompatItemStyle
);
Upvotes: 2
Reputation: 1897
Well, you should try this open source project http://actionbarsherlock.com , you will find it's full definition on this website In the newest version it will have support for features provided by ICS.
Upvotes: 4
Reputation: 4485
here you go. The officle android article is called: ActionBarCompat - Action Bar Compatibility. (just in case the link wont work for ever)
Upvotes: 12
Reputation: 22770
The equivalent of action bar in pre-Honeycomb versions of Android is the options menu, accessible under Menu button.
Upvotes: 0