Remove a listener from a view in android

Well, I found the answer. This doesnt appear to be documented anywhere, but I went through the code for the View class and if you pass null to the setClickListener methods, it will remove the listener.

checkbox.setOnCheckChangedListener(null);

This should work for any event listener.

Leave a Comment