start an activity from button click in android studio code example
Example 1: android how to start a new activity on button click
Intent intent = new Intent(this, ActivityToBeCalled.class);
startActivity(intent);
Example 2: how to open activity in android studio
Intent intent = new Intent(this, DisplayMessageActivity.class);
intent.putExtra(key:,value:);
startActivity(intent);