Skip to content

Commit 5a9fd25

Browse files
committed
Improve JavaDoc on @EditorAction
The JavaDoc had no information about the return value of the listener method, now this is added.
1 parent 2465468 commit 5a9fd25

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

  • AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/EditorAction.java‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@
4141
* <li>An int parameter to get the actionId</li>
4242
* <li>A {@link android.view.KeyEvent} parameter</li>
4343
* </ul>
44-
*
44+
* <p>
45+
* The return type of the method can be either <b>void</b> or <b>boolean</b>. In
46+
* case of <b>boolean</b>, the value returned from the annotated method will be
47+
* returned in the generated listener method (indicating event consumption). If
48+
* the annotated method is <b>void</b>, always <b>true</b> will be returned in
49+
* the listener method (so the event is consumed).
50+
* </p>
4551
* <blockquote>
4652
*
4753
* Examples :
@@ -66,6 +72,12 @@
6672
* void onEditorActionsOnHelloTextView() {
6773
* // Something Here
6874
* }
75+
*
76+
* &#064;EditorAction(R.id.helloTextView)
77+
* <b>boolean</b> onEditorActionsOnHelloTextView() {
78+
* // Something Here
79+
* <b>return false;</b>
80+
* }
6981
* </pre>
7082
*
7183
* </blockquote>

0 commit comments

Comments
 (0)