1Intent intent = new Intent(this, DisplayMessageActivity.class);
2 intent.putExtra(key:,value:);
3 startActivity(intent);
1//going to another activity while ending the
2//previous one so that users cannot go back
3btListe = (ImageButton)findViewById(R.id.Button_Liste);
4 btListe.setOnClickListener(new OnClickListener()
5 { public void onClick(View v)
6 {
7 intent = new Intent(main.this, ListViewImage.class);
8 startActivity(intent);
9 finish();
10 }
11 });
1OnClickListener onClickListener = new OnClickListener() {
2 @Override
3 public void onClick(View v) {
4 startActivity(new Intent(action));
5 }
6};
7
8Button button = (Button) findViewById(id);
9button.setOnClickListener(onClickListener);