19.隐式Intent
来源:互联网 发布:olay新生塑颜系列知乎 编辑:程序博客网 时间:2024/06/11 23:37
<activity android:name=".SecondActivity"> <intent-filter> <action android:name="com.example.testactivity.ACTION_START"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="com.example.activitytest.MY_CATEGORY"/> </intent-filter> </activity>
在AndroidManifest.xml中,
button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent("com.example.activitytest.ACTION_START"); intent.addCategory("com.example.activitytest.MY_CATEGORY"); startActivity(intent); } });
注意,每个Intent中只能指定一个action,但却能指定多个category。多个category也是为了精确查找活动。
阅读全文
0 0
- 19.隐式Intent
- 显示Intent,隐式Intent
- 显示Intent,隐式Intent
- 显示Intent,隐式Intent
- Intent—隐式Intent与显示Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 隐式Intent
- 抓取一个网页并解析HTML
- 关于自然语言的实体抽取和舆情分析技术
- 将数组转换为List
- J2EE系列之Spring4学习笔记(十二)--Spring对事务管理
- 线程中断、超时与降级——《亿级流量》内容补充
- 19.隐式Intent
- 灰度变换:imadjust and stretchlim
- 24_方法_方法的本质_形参_实参_return语句
- c#多线程对于字典型的处理
- Flask-SQLAlchemy 学习总结
- containing block和BFC
- 使用Android自带的TTS实现语音播报(电话号码)功能
- Openlayers之加载MapQuest地图
- IE7和IE9中有关于javaScript的兼容问题