Android中Intent传值

1 A页面:       

2     Intent intent = new Intent(GrouponActivity.this, GroupBuyDetailsActivity.class);

3            intent.putExtra("ID", entity.getID());

4            startActivity(intent);

5 B页面:

6     Intent intent = getIntent();

7     id = intent.getIntExtra("ID", -1);

 

你可能感兴趣的:(android)