I have read some code that people use something like this
view.setOnLongClickListener(null);
What does it means and for what can be useful ? why someone uses this ?
is that the same as this
view.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) {
return true;
}
});
Null would remove any callbacks that are currently set as the views listener.
It definitely isn't the same as the second one, which assigns a listener to the view to control what will happen when you perform a long click on your view.