2012年9月10日 星期一

intent中的俩方法区别


http://zhouxun1026.iteye.com/blog/1618618

public Intent putExtra (String name, double[] value)
设置方法 intent.putExtra("aaa", "bbbb");
获取方法 this.getIntent().getCharSequenceExtra("aaa")

public Intent putExtras (Bundle extras)

设置方法
Bundle bd = new Bundle();
bd.putString("aaa",“bbbb”);
intent.putExtras(bd);
获取方法
Bundle bd=this.getIntent().getExtras();
bd.getString("aaa"));


总结:带s的得通过个Bundle来绑定数据

沒有留言:

張貼留言