Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find symbol "OnKeyListener"

What am I missing? I feel really silly having to post this but perhaps somebody else will see the (likely obvious) error that I am making.

import android.app.Activity;
import android.os.Bundle;
import android.view.*;
import android.widget.*;

public class Primes extends Activity implements OnKeyListener
{
...
}

Error:

[javac] ...Primes.java:9: cannot find symbol
[javac] symbol: class OnKeyListener
[javac] public class Primes extends Activity implements OnKeyListener
like image 641
jacky Avatar asked Dec 07 '25 09:12

jacky


1 Answers

That's a nested interface.

public class Primes extends Activity implements View.OnKeyListener
like image 159
SLaks Avatar answered Dec 08 '25 23:12

SLaks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!