Advertisement
hacknik

Android Intent put extra Bundle

Dec 20th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. Android Intent put extra Bundle
  2.  
  3.     int id1 = itemlist.get(position).getId();
  4.     Intent i = new Intent(Acitvity1.this, Activity2.class);
  5.     i.putExtra("id", id1);
  6.     startActivity(i);
  7.  
  8. in other activity
  9.  
  10.     id = getIntent().getIntExtra("id", 0);
  11.     name=getIntent().getStringExtra("name")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement