Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. public class MainActivity extends ActionBarActivity {
  2. @Override
  3. public void onClick(View view) {
  4. Intent intent = new Intent(this, Anotherctivity.class);
  5. intent.putExtra("KEY", "content");
  6. startActivity(intent);
  7. }
  8. }
  9.  
  10.  
  11. // in another activity
  12. public void onClick(View v) {
  13. finish(); // completely destroy current activity
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement