So I want an intent to start an Activity that simply brings up a dialog popup box telling the user how to use the app.
I have the code:
private final View.OnClickListener btnClick = new View.OnClickListener() {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.about_box:
Intent i = new Intent(this, About.class);
startActivity(i);
break;
}
}
}
but the Intent is giving me the error:
The constructor Intent(new View.OnClickListener(){}, Class) is undefined
Any idea on workarounds?
Thanks.
Change,
Intent i = new Intent(this, About.class);
to,
Intent i = new Intent(TheCurrentClassName.this, About.class);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With