forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
ActionBarSherlockIntegration
pyricau edited this page May 25, 2012
·
1 revision
Since AndroidAnnotations 2.6
AndroidAnnotations integrates smoothly with ActionBarSherlock.
You just need to use the ActionBarSherlock library in a standard way, and then annotate your activities with AndroidAnnotations.
@EActivity(R.layout.my_layout)
public class MyActivity extends SherlockActivity {
}ActionBarSherlock overrides the Options menu mechanism, and provides its own alternate implementation. When using annotations dedicated to Options Menu, AndroidAnnotations detects ActionBarSherlock and uses the alternate implementation.
@EActivity(R.layout.my_layout)
@OptionsMenu(R.menu.my_menu)
public class MyActivity extends SherlockActivity {
@OptionsItem
void menuRefreshSelected() {
}
@OptionsItem({ R.id.menu_search, R.id.menu_share })
void multipleMenuItems() {
}
@OptionsItem
boolean menuAdd(MenuItem item) {
return true;
}
}AndroidAnnotations was created by Pierre-Yves Ricau and is sponsored by eBusinessInformations.
04/11/2012 The 2.7 release is out
- Get started!
- Download
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow