org.androidannotations.annotations
Annotation Type Touch


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

This annotation is intended to be used on methods to receive events defined by View.OnTouchListener.onTouch(android.view.View, MotionEvent) when the view has been touched by the user.

The annotation value should be one or several of R.id.* fields. If not set, the method name will be used as the R.id.* field name.

The method may return a boolean, void, or a Boolean. If returning void, it will be considered as returning true (ie the method has handled the event).

The method MAY have one or two parameters:

Example :
 @Touch(R.id.myButton)
 void touchOnMyButton() {
        // Something Here
 }
 
 @Touch
 void myButtonTouched(View view) {
        // Something Here
 }
 
 @Touch
 void myButtonTouched(View view, MotionEvent motionEvent) {
        // Something Here
 }
 

See Also:
Click, LongClick

Optional Element Summary
 String[] resName
           
 int[] value
           
 

value

public abstract int[] value
Default:
-1

resName

public abstract String[] resName
Default:
""


Copyright © 2010-2014. All Rights Reserved.