You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 74fd5f1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/EApplication.java
+43-3Lines changed: 43 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,51 @@
21
21
importjava.lang.annotation.Target;
22
22
23
23
/**
24
-
* Should be used on android.app.Application classes to enable usage of
25
-
* AndroidAnnotations
24
+
* Should be used on {@link android.app.Application} classes to enable usage of
25
+
* AndroidAnnotations.
26
+
* <p/>
27
+
* Your code related to injected beans should go in an {@link AfterInject}
28
+
* annotated method.
29
+
* <p/>
30
+
* If the class is abstract, the enhanced application will not be generated.
31
+
* Otherwise, it will be generated as a final class. You can use
32
+
* AndroidAnnotations to create Abstract classes that handle common code.
33
+
* <p/>
34
+
* Most annotations are supported in {@link EApplication} classes, except the
35
+
* ones related to views and extras.
36
+
* <p/>
37
+
* The enhanced application can also be injected in any enhanced class by using
38
+
* {@link App} annotation.
39
+
* <p/>
40
+
* <blockquote>
26
41
*
27
-
* Most annotations are supported in {@link EApplication} classes
42
+
* Example :
28
43
*
44
+
* <pre>
45
+
* @EApplication
46
+
* public class MyApplication extends Application {
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/EIntentService.java
+54-1Lines changed: 54 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,60 @@
21
21
importjava.lang.annotation.Target;
22
22
23
23
/**
24
-
* Use this annotation to enhance an Android IntentService
24
+
* Should be used on {@link android.app.IntentService} classes to enable usage
25
+
* of AndroidAnnotations.
26
+
* <p/>
27
+
* Your code related to injected beans should go in an {@link AfterInject}
28
+
* annotated method.
29
+
* <p/>
30
+
* If the class is abstract, the enhanced intentservice will not be generated.
31
+
* Otherwise, it will be generated as a final class. You can use
32
+
* AndroidAnnotations to create Abstract classes that handle common code.
33
+
* <p/>
34
+
* The generated class will also contain an IntentBuilder to start activity with
35
+
* a fluent API. Android's extra can also be enhanced by using {@link Extra}
36
+
* annotation on every native or serializable/parcelable field.
37
+
* <p/>
38
+
* The IntentService class should contain a {@link ServiceAction} annotated
39
+
* method in order to respond to an action.
40
+
* <p/>
41
+
* <blockquote>
42
+
*
43
+
* Example :
44
+
*
45
+
* <pre>
46
+
* @EActivity(R.layout.main)
47
+
* public class MyActivity extends Activity {
48
+
*
49
+
* public void launchAction() {
50
+
* // Note the use of generated class instead of original one
51
+
* MyIntentService_.intent(this)
52
+
* .myAction("test", 10L)
53
+
* .start();
54
+
* }
55
+
*
56
+
* }
57
+
*
58
+
* <pre>
59
+
* @EIntentService
60
+
* public class MyIntentService extends IntentService {
61
+
*
62
+
* @ServiceAction
63
+
* void mySimpleAction() {
64
+
* // ...
65
+
* }
66
+
*
67
+
* @ServiceAction
68
+
* void myAction(String valueString, long valueLong) {
0 commit comments