org.androidannotations.annotations
Annotation Type LongClick


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

This annotation is intended to be used on methods to receive events defined by View.OnLongClickListener.onLongClick(android.view.View) when the view has been long clicked 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 parameter:

Example :
 @LongClick(R.id.myButton)
 void longClickOnMyButton() {
        // Something Here
 }
 
 @LongClick
 void myButtonLongClicked(View view) {
        // Something Here
 }
 
 @LongClick(R.id.myButton)
 boolean longClickConsumedOnMyButton(View view) {
        return true;
 }
 

See Also:
Touch, Click

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.