android问题 我想实现把第一个Activity中edit中输入的内容获取到另一个Activity的TextView中显示出来,如何实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 activity之间传递参数你可以 ntent intent = new Intent();intent.setClass(this, DetailActivity.class);intent.putExtra("human", human);intent.putExtra("method", method);.....有更多参数都可以在这里putstartActivity(intent);在相应的activity里可以这样取传过来的参数getIntent().getExtras().getSerializable("human");....... 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 应该是Intent i=new Intent();i.setClass(a.this,b.class); 1.将数据放在Intent中传过去2.弄个应用级的全局变量,将数据保存起来,推荐自己实现一个Application,这也是官方推荐的方式。 Intent 就可以实现了,自己想吧,简单的自己想 方法一:Intent与Bundle结合使用。A.javaIntent intent=new Intent(A.this,B.class);Bundle bundle=new Bundle();bundle.putString("str",EditText.getText().toString())。 intent.putExtras("data",bundle); startActivity(intent);B.javaIntent intent=this.getIntent();Bundle bundle=intent.getBundleExtra("data");String str=bundle.getString("str");这样就可以了方法二:可以用sharedpreference进行数据存储,这个网上资料比较多。我个人建议第一种方法就可以了。 Intent与Bundle结合使用。 同意2L啊。通过Intent传递 android2.3.3 内核中nfc驱动问题? 【救命啊】eclipse出错了,有截图、、 怎么我编写的震动停不下来了。。。了。。。。 手机与PC WLAN通信问题 google有没有提供读写USIM(3G手机卡)的接口? 求助edittext 请问:怎么监控手机上的每个程序产生了多少流量? android触摸代码实现?那位大哥给小弟个例子 android调用C#的WCF返回400,请大神指点!!!! HttpClient与Webview共享cookies,求详细demo 关于Timer实现页面自动跳转问题。 想做Android编程,没有任何基础
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");
.......
Intent i=new Intent(a.this,b.class);
Bundle bundle=new Bundle();
bundle.putString(EditText.getText().toString())。
i.putExtras(bundle);
startActivity(i);
可能不太正确,具体的楼主可以去查一下API
i.setClass(a.this,b.class);
2.弄个应用级的全局变量,将数据保存起来,推荐自己实现一个Application,这也是官方推荐的方式。
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进行数据存储,这个网上资料比较多。
我个人建议第一种方法就可以了。
通过Intent传递