Posted By

variable3 on 04/27/11


Tagged

Activites Intents


Versions (?)

Android Activities, Intents


 / Published in: Java
 

  1. Button button=(Button)findViewById(R.id.buttonID);
  2. //Override onClick method of button click--
  3. button.setOnClickListener(new View.OnClickListener() {
  4. public void onClick(View arg0) {
  5. Intent intent = new Intent(context,anotherActivity);
  6. startActivity(intent);
  7. }
  8. });

Report this snippet  

You need to login to post a comment.