我想实现把第一个Activity中edit中输入的内容获取到另一个Activity的TextView中显示出来,如何实现

解决方案 »

  1.   

    activity之间传递参数你可以 
    ntent intent = new Intent();
    intent.setClass(this, DetailActivity.class);
    intent.putExtra("human", human);
    intent.putExtra("method", method);
    .....
    有更多参数都可以在这里put
    startActivity(intent);在相应的activity里可以这样取传过来的参数
    getIntent().getExtras().getSerializable("human");
    .......
      

  2.   

    Intent与Bundle结合使用。比如
    Intent i=new Intent(a.this,b.class);
    Bundle bundle=new Bundle();
    bundle.putString(EditText.getText().toString())。
    i.putExtras(bundle);
    startActivity(i);
    可能不太正确,具体的楼主可以去查一下API
      

  3.   

    应该是Intent i=new Intent();
    i.setClass(a.this,b.class);
      

  4.   

    1.将数据放在Intent中传过去
    2.弄个应用级的全局变量,将数据保存起来,推荐自己实现一个Application,这也是官方推荐的方式。
      

  5.   

    Intent 就可以实现了,自己想吧,简单的自己想
      

  6.   

    方法一:Intent与Bundle结合使用。
    A.java
    Intent intent=new Intent(A.this,B.class);
    Bundle bundle=new Bundle();
    bundle.putString("str",EditText.getText().toString())。
      intent.putExtras("data",bundle);
      startActivity(intent);
    B.java
    Intent intent=this.getIntent();
    Bundle bundle=intent.getBundleExtra("data");
    String  str=bundle.getString("str");
    这样就可以了
    方法二:可以用sharedpreference进行数据存储,这个网上资料比较多。
    我个人建议第一种方法就可以了。
      
     
      

  7.   

    Intent与Bundle结合使用。 同意2L啊。
    通过Intent传递