@Retention(value=CLASS)
@Target(value=METHOD)
public @interface AfterTextChange
This annotation is intended to be used on methods to receive events defined
by TextWatcher.afterTextChanged(Editable s) after the
text is changed on the targeted TextView or subclass of TextView.
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 eventEditable to make changes on modified text.
Example :
@AfterTextChange(R.id.helloTextView)
void afterTextChangedOnHelloTextView(Editable text, TextView hello) {
// Something Here
}
@AfterTextChange
void helloTextViewAfterTextChanged(TextView hello) {
// Something Here
}
@AfterTextChange({R.id.editText, R.id.helloTextView})
void afterTextChangedOnSomeTextViews(TextView tv, Editable text) {
// Something Here
}
@AfterTextChange(R.id.helloTextView)
void afterTextChangedOnHelloTextView() {
// Something Here
}
BeforeTextChange,
TextChangeCopyright © 2010-2014. All Rights Reserved.