com.googlecode.androidannotations.annotations
Annotation Type BeforeTextChange


@Retention(value=CLASS)
@Target(value=METHOD)
public @interface BeforeTextChange

This annotation is intended to be used on methods to receive events defined by TextWatcher.beforeTextChanged(CharSequence s, int start, int count, int after) before 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 parameters:

Some usage examples of @BeforeTextChange annotation:
 @BeforeTextChange(R.id.helloTextView)
 void beforeTextChangedOnHelloTextView(TextView hello, CharSequence text, int start, int count, int after) {
        // Something Here
 }
 
 @BeforeTextChange
 void helloTextViewBeforeTextChanged(TextView hello) {
        // Something Here
 }
 
 @BeforeTextChange({R.id.editText, R.id.helloTextView})
 void beforeTextChangedOnSomeTextViews(TextView tv, CharSequence text) {
        // Something Here
 }
 
 @BeforeTextChange(R.id.helloTextView)
 void beforeTextChangedOnHelloTextView() {
        // Something Here
 }
 


Optional Element Summary
 String[] resName
           
 int[] value
           
 

value

public abstract int[] value
Default:
-1

resName

public abstract String[] resName
Default:
""


Copyright © 2010-2013. All Rights Reserved.