forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
TextChangeEvents
pyricau edited this page May 10, 2012
·
5 revisions
Since AndroidAnnotations 2.6
This annotation is intended to be used on methods to receive events defined by android.text.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:
- A
android.widget.TextViewparameter to know which view has targeted this event -
An android.text.Editableto make changes on modified text.
Some usage examples of @BeforeTextChange annotation :
@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
}14/06/2012 The 2.6 release is out
- Get started!
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow