Try this,
ImageButton mainButton = (ImageButton) findViewById(R.id.mainButton);
mainButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new intent(this,NewActivityname.class);
startActivity(intent);
}
});}
Add your newactivity class in androidmanifest file
solved How can i create an new activity on imagebutton click? [closed]