I have two java files. In the first I have my activity which starts when the app starts. The second is called "AuswahlActivity.java" and the xml file "auswahl.xml". I have this code into AuswahlActivity.java:
public class AuswahlActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.auswahl);
//Your code here
}
}
Now I want to start the activity like this:
Intent myIntent = new Intent(this, AuswahlActivity.class);
this.startActivity(myIntent);
But I get the error message The constructor Intent(new View.OnClickListener(){}, Class<AuswahlActivity>) is undefined
How do I get this working?
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