Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1398722
  • 博文数量: 188
  • 博客积分: 1784
  • 博客等级: 上尉
  • 技术积分: 2772
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-05 22:20
个人简介

发上等愿,结中等缘,享下等福;择高处立,就平处坐,向宽处行。

文章分类

全部博文(188)

文章存档

2020年(12)

2019年(11)

2018年(4)

2017年(3)

2016年(11)

2015年(22)

2014年(19)

2013年(25)

2012年(32)

2011年(49)

分类: 嵌入式

2012-07-19 16:00:28

有3个Activity 分别是A,B,C

A里面Intent 首先 putExtra("1","1");putExtra("2","2");setclass(A.this,B.class);

B里面Intent 首先 putExtra("3","3");setclass(B.this,C.class);

C里面的Intent 能收到这3个键值吗?

从A-->B 新建一个intent 获取从A到B的intent,这个intent中保存了1,2的值;

final Intent getIntent=getIntent();
从B-->C 新建一个intent 把1,2的值添加进去
Intent intent=new Intent();
intent.putExtra("3", "3");
intent.putExtra("1",getIntent.getStringExtra("1"));
intent.putExtra("2",getIntent.getStringExtra("2"));
在B中有两个intent
这样C里就能接受3个值了
阅读(6322) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~