0
Eae guys, I’m trying to define a Reader for an Edittext but it’s giving error.
Error: setKeyListener (android.text.method.Keylistener) in Textview cannot be Applied to (com.example.calculaarea.Mainactivity)
My Code:
//Minha Main implementa a OnKeyListener e aqui passo ela ao EditText
this.mHolder.editLargura.setKeyListener(this);
//Essa é a implementaçao do método onKey
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_DOWN && keyCode == KeyEvent.KEYCODE_ENTER)
{
return true;
}
return false;
}
How could I correct this mistake?
Vlw man I hadn’t paid attention on On
– Jonathan Emanuel