|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=CLASS) @Target(value=TYPE) public @interface EService
Should be used on Service
classes to enable usage of
AndroidAnnotations.
AfterInject
annotated method.
If the class is abstract, the enhanced service will not be generated.
Otherwise, it will be generated as a final class. You can use
AndroidAnnotations to create Abstract classes that handle common code.
The generated class will also contain an IntentBuilder to start service with
a fluent API.
Example :@EActivity(R.layout.main) public class MyActivity extends Activity { public void startService() { // Note the use of generated class instead of original one MyService_.intent(this).start(); } public void stopService() { // Note the use of generated class instead of original one MyService_.intent(this).stop(); } }@EService public class MyService extends Service { }
AfterInject
,
ServiceAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |