android switch to another activity code example
Example 1: android how to switch between activities
Intent intent = new Intent(getApplicationContext(), ActivityToBeOpened.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);