Annotation Type OnLongClick



  • @Retention(value=CLASS)
     @Target(value=METHOD)
    public @interface OnLongClick
    Bind a method to an OnLongClickListener on the view for each ID specified.
    
      @OnLongClick(R.id.example) boolean onLongClick() {
       Toast.makeText(this, "Long clicked!", Toast.LENGTH_SHORT).show();
       return true;
     }
     
    Any number of parameters from OnLongClickListener#onLongClick(android.view.View) may be used on the method.
    See Also:
    OnLongClickListener
    • Optional Element Summary

      Optional Elements

      Modifier and Type Optional Element and Description
      int[] value
      View IDs to which the method will be bound.
    • Element Detail

      • value

        public abstract int[] value
        View IDs to which the method will be bound.
        Default:
        <error>