android intent 用bundle传递数据
2012-12-14 10:21
295 查看
存放数据:
String s = "value";
Intent intent = new Intent();
Bundle bundle = new Bundle();
bundle.putString("key", s);
intent.putExtras(bundle);
获取数据:
Intent intent = getIntent();
Bundle bundle = new Bundle();
bundle = intent.getExtras();
String s = bundle.getString("key");
String s = "value";
Intent intent = new Intent();
Bundle bundle = new Bundle();
bundle.putString("key", s);
intent.putExtras(bundle);
获取数据:
Intent intent = getIntent();
Bundle bundle = new Bundle();
bundle = intent.getExtras();
String s = bundle.getString("key");
相关文章推荐
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- 安卓学习之--android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- Android 使用Intent和Bundle传递数据及如何传递enum
- [Android] Intent及Bundle传递数据
- Android中Intent和Bundle传递数据的异同
- Android之Activity之间的数据传递-intent-bundle
- Android使用intent、bundle传递数据
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- android Activity之间通过Bundle和Intent传递数据
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- Android中Activity之间的数据传递(Intent和Bundle)
- Android中Intent结合Bundle传递数据
- android使用Intent传递数据 2 种方式(Intent和Bundle)
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- Android——通过Intent,Bundle在activity间进行数据传递
- 简要分析Android中的Intent,Bundle,Parcel中的数据传递
- android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)
- (4.1.30)android 数据传递详解(Serialization、Parcelable、Parcel、Intent、Bundle)