我在Android中为setOnKeyListener编写了EditText小部件的代码。但我会搞不懂为什么会出错。下面是我的代码

我遵守了书本上的教程。但还是出错了。你能给我一个解决办法吗?
发布于 2015-05-06 09:27:54
您正在导入android.content.DialogInterface.OnKeyListener。您要导入的是android.view.View.OnKeyListener。
当您导入android.content.DialogInterface.OnKeyListener时,Eclipse试图在EditText中找到一个以android.content.DialogInterface.OnKeyListener作为参数的setOnKeyListener方法,但是这样的方法并不存在。
https://stackoverflow.com/questions/30072664
复制相似问题