Intent带参数跳转

来源:互联网 发布:mac开压缩包有广告 编辑:程序博客网 时间:2024/05/19 16:07

传递方:

Intent intent = new Intent();       Bundle bundle = new Bundle();       bundle.putString("XXX", XXX);       intent.setClass(ActivityMain.this,XXX.class);       intent.putExtras(bundle);       startActivity(intent);         

接收方:

Bundle bundle = new Bundle();         bundle = this.getIntent().getExtras();         double XXX=  bundle.getString("XXX");
0 0
原创粉丝点击