This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Enhance activities
Kay-Uwe Janssen edited this page Oct 9, 2016
·
8 revisions
Since AndroidAnnotations 1.0
The @EActivity
annotation indicates that an activity will be enhanced by AndroidAnnotations. Its value parameter must be a valid layout id, that will be used as the Content View for the activity.
You can leave the value parameter empty, which means that no content view will be set. You will probably want to set the content view yourself in the onCreate()
method, before the binding is done.
Usage example:
@EActivity(R.layout.main)
public class MyActivity extends Activity {
}
And without any layout id:
@EActivity
public class MyListActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Also see how to start an annotated activity.
19/11/2020 The 4.8.0 release is out !
- Get started!
- Cookbook, full of recipes
- Customize annotation processing
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow
- Ask on Gitter