Android 开发-Intent传递普通字符串

假设A传递id到B中 

ActivityA:

    Intent intent=new Intent();
    intent.setClass(ActivityA.this,ActivityB.class);
    intent.putExtra("id", "值");
    startActivity(intent);

ActivityB:

  Intent intent=getIntent();
  String stringValue
=intent.getStringExtra("id");

 

posted @ 2013-06-28 09:54  Merray  Views(8957)  Comments(0Edit  收藏  举报