@Retention(value=CLASS) @Target(value=METHOD) public @interface OnLongClick
OnLongClickListener
on the view for each ID
specified.
@OnLongClick(R.id.example) boolean onLongClick() {
Toast.makeText(this, "Long clicked!", LENGTH_SHORT).show();
return true;
}
Any number of parameters from View.OnLongClickListener.onLongClick(android.view.View)
may be
used on the method.View.OnLongClickListener
,
Optional
Modifier and Type | Optional Element and Description |
---|---|
int[] |
value
View IDs to which the method will be bound.
|
Copyright © 2013-2015. All Rights Reserved.