My Question:
I was looking at the source code of TextWatcher and I didn't get the concept here. What was the point of extending to NoCopySpan?
TextWatcher.java:
public interface TextWatcher extends NoCopySpan {
public void beforeTextChanged(CharSequence s, int start, int count, int after);
public void onTextChanged(CharSequence s, int start, int before, int count);
public void afterTextChanged(Editable s);
}
NoCopySpan.java:
package android.text;
/**
* This interface should be added to a span object that should not be copied into a new Spanned when performing a slice or copy operation on the original Spanned it was placed in.
*/
public interface NoCopySpan {
/**
* Convenience equivalent for when you would just want a new Object() for
* a span but want it to be no-copy. Use this instead.
*/
public class Concrete implements NoCopySpan {}
}