Intent 传数据
来源:互联网 发布:mac地址ip地质作用 编辑:程序博客网 时间:2024/06/06 05:33
放数据
Intent intent=new Intent();
intent.setClass(MainActivity.this, SecondActivity.class);//从一个activity跳转到另一个activity
intent.putExtra("str", "Intent Demo");//给intent添加额外数据,key为“str”,key值为"Intent Demo"
startActivity(intent);
取数据
Intent intent=getIntent();//getIntent将该项目中包含的原始intent检索出来,将检索出来的intent赋值给一个Intent类型的变量intent
Bundle bundle=intent.getExtras();//.getExtras()得到intent所附带的额外数据
String str=bundle.getString("str");//getString()返回指定key的值
2 2
- Intent传数据对象
- android intent传数据
- Intent传数据汇总
- Intent 传数据
- intent传数据 setData
- onNewIntent(Intent intent) intent无法获取数据
- Intent跳转并回传数据
- Intent回传数据与Activity生命周期
- Intent用法之 回传数据
- intent传数据和EventBus各自用处
- Android - Intent - 传递数据
- Intent传递数据
- intent数据传递问题
- Intent传递的数据
- 使用Intent分享数据
- Intent 数据传递
- Intent传递数据
- Android - Intent - 传递数据
- hdu--4455+ Substrings+2012杭州区域赛C题+DP
- Swift-- 方法
- [TwistedFate]属性property
- zoj 3891 K-hash(后缀自动机)
- hdoj2053(switch game
- Intent 传数据
- POJ 3009 dfs暴搜
- 外键约束和级联操作
- Java学习笔记(1):重载方法
- 【编程开发】opencv实现对Mat中某一列或某一行的元素进行normalization
- READING NOTE: Two-Stream Convolutional Networks for Action Recognition in Videos
- 用于Android ART虚拟机JNI调用的NativeBridge介绍
- 配置ADT
- C中堆和栈的区别