@Retention(value=CLASS) @Target(value=METHOD) public @interface EditorAction
This annotation is intended to be used on methods to receive events defined
by
TextView.OnEditorActionListener.onEditorAction(android.widget.TextView, int, android.view.KeyEvent)
when an action is performed on the editor.
The annotation value should be one or several R.id.* fields that refers to TextView or subclasses of TextView. If not set, the method name will be used as the R.id.* field name.
The method MAY have multiple parameter :
TextView parameter to know which view has
targeted this eventKeyEvent parameter
Examples :
@EditorAction(R.id.helloTextView)
void onEditorActionsOnHelloTextView(TextView hello, int actionId, KeyEvent keyEvent) {
// Something Here
}
@EditorAction
void helloTextViewEditorAction(TextView hello) {
// Something Here
}
@EditorAction({R.id.editText, R.id.helloTextView})
void onEditorActionsOnSomeTextViews(TextView tv, int actionId) {
// Something Here
}
@EditorAction(R.id.helloTextView)
void onEditorActionsOnHelloTextView() {
// Something Here
}
public abstract int[] value
public abstract String[] resName
Copyright © 2010-2014. All Rights Reserved.