I used following code in main activity
public void button(View v){
//Create an intent to start the new activity.
// Our intention is to start secondActivity
Intent intent = new Intent();
intent.setClass(this,Activity.class);
startActivity(intent);
}
How can I display random activity when click button? Please help me!
debugged some codes above because there’s an error in setClass().. this one works: