1Intent intent = new Intent(this, DisplayMessageActivity.class);
2 intent.putExtra(key:,value:);
3 startActivity(intent);
1Intent intent = new Intent(this, ActivityToBeCalled.class);
2startActivity(intent);
1 private Button button;
2
3 @Override
4 protected void onCreate(Bundle savedInstanceState) {
5 super.onCreate(savedInstanceState);
6 setContentView(R.layout.activity_main4);
7 button = (Button)findViewById(R.id.button7);
8
9 button.setOnClickListener(new View.OnClickListener() {
10 @Override
11 public void onClick(View v) {
12 openInsideActivity4();
13 }
14 });
15 }
16 public void openInsideActivity4()
17 {
18 Intent intent = new Intent(this,InsideActivity4.class);
19 startActivity(intent);
20 }