Android TextWatcher类还是接口?

Android TextWatcher类还是接口?,android,Android,例如,在图书和互联网中,TextWatcher是类,但在android DevLoper上它是接口。 Eclipse说,它是一个接口。 谁是对的?TextWatcher是一个界面。在您给出的示例中,它被用作接口,MyTextWatcher类实现了TextWatcher接口。如果TextWatcher是一个类,则需要使用扩展 接口: private class MyTextWatcher implements TextWatcher { 类别: private class ThisWontWor

例如,在图书和互联网中,TextWatcher是类,但在android DevLoper上它是接口。 Eclipse说,它是一个接口。
谁是对的?

TextWatcher是一个界面。在您给出的示例中,它被用作接口,MyTextWatcher类实现了TextWatcher接口。如果TextWatcher是一个类,则需要使用扩展

接口:

private class MyTextWatcher implements TextWatcher {
类别:

private class ThisWontWork extends TextWatcher {

TextWatcher是android.text.TextWatcher中的接口

public interface TextWatcher implements NoCopySpan

我复制了他的代码,Eclipse说它错了——TextWatcher类型不能是MyTextWatcher的超类;超类必须是类哦,你说的是答案,不是问题。无论如何,我想说,答案基本上是一般性的,因为您不扩展接口,而是实现它。我想他们的意思是
类MyTextWatcher实现TextWatcher