jacky
jacky

Reputation: 205

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

Upvotes: 3

Views: 727

Answers (1)

SLaks
SLaks

Reputation: 887469

That's a nested interface.

public class Primes extends Activity implements View.OnKeyListener

Upvotes: 2

Related Questions