美文网首页
IntentFilter小结

IntentFilter小结

作者: 奋斗的Leo | 来源:发表于2016-05-22 12:10 被阅读26次

1.action属性:在AndroidManifest中至少定义一个,不然不能隐式启动。intent中如果设置了action,那至少要匹配intent-filter中配置的可以多个的action中至少一个。intent中设置action值只能一个,而intent-filter可以配置多个,而且值可以重复,如果有两个activity配置相同的action值,而其他条件都一样,则会弹出选择框

2.category属性:至少要有DEFAULT,不然不能隐式启动,因为默认隐式启动,会默认添加。category可以添加多个,但在intent中添加的话,所添加的都要已经在intent-filter中配置了

3.data属性:如果intent-iilter中定义了至少一个data属性,那intent要全部匹配,才能启动。

相关文章

  • IntentFilter小结

    1.action属性:在AndroidManifest中至少定义一个,不然不能隐式启动。intent中如果设置了a...

  • IntentFilter的匹配规则

    IntentFilter的匹配规则 IntentFilter中的过滤信息有action,category,data...

  • Intent与IntentFilter匹配原则

    Intent与IntentFilter匹配原则: Intent(意图)与IntentFilter(意图过滤器)之间...

  • IntentFilter的匹配规则

    允许转载请注明出处。 IntentFilter的匹配规则 对于初学者来说,学习IntentFilter的匹配规则还...

  • intentFilter

    activity有显示启动和隐式启动 显示启动。在intent直接写入包名和类名隐式启动。动过intent过滤器启...

  • IntentFilter

    IntentFilter 中包含 action,category,data三种元素 一、Activity 调用模式...

  • 安卓学习:IntentFilter

    IntentFilter是什么 顾名思义IntentFilter:“意图过滤器”,主要用来过滤隐式意图。当用户做一...

  • IntentFilter匹配

    Intent不应该同时存在显示调用及隐示调用,同时存在时以显示调用为准 。隐式调用需要Intent能够匹配目标组件...

  • 骇人听闻的Android知识点

    00000100 IntentFilter中设置addDataScheme后,比如content, 广播中的Int...

  • App-Link配置记录-源码解析

    背景简介 Deep Link 和 App Link 官方文档 Deep link 是基于intentFilter(...

网友评论

      本文标题:IntentFilter小结

      本文链接:https://www.haomeiwen.com/subject/nmborttx.html