Here is My Code,I need a to put something inside{} to link the button to new class or activity like second page.java :
public void addListenerOnButton() {
ImageButton imageButton = (ImageButton) findViewById(R.id.imageButton1);
imageButton.setOnClickListener(new OnClickListener() {
/*What can I put here to open new class
,I mean another activity like secondp.java.*/
}
I Tried to put below code, but I got the following error:
The constructor Intent(new View.OnClickListener(){}, Class<List>) is undefined
Code
@Override
public void onClick(View arg0) {
Intent k = new Intent(this,Secondp.class);
startActivity(k);