注:在《疯狂android讲义》中,此属性称为Component,官方文档中称为ComponentName。

1、The name of the component that should handle the intent. This field is a ComponentName object — a combination of the fully qualified class name of the target component (for example "com.example.project.app.FreneticActivity") and the package name set in
the manifest file of the application where the component resides (for example, "com.example.project"). The package part of the component name and the package name set in the manifest do not necessarily have to match.

The component name is optional. If it is set, the Intent object is delivered to an instance of the designated class. If it is not set, Android uses other information in the Intent object to locate a suitable target
— see Intent Resolution, later in this document.



The component name is set by setComponent(), setClass(), or setClassName() and read by getComponent().

2、ComponentName用于显式指定Intent所对应的组件。

Intent七在属性之一:ComponentName的更多相关文章

  1. Intent七在属性之一:ComponentName 分类: H1_ANDROID 2013-11-10 10:54 1184人阅读 评论(1) 收藏

    注:在<疯狂android讲义>中,此属性称为Component,官方文档中称为ComponentName. 1.The name of the component that should ...

  2. Intent的常用属性之ComponentName

    启动activity的另一种方式 在按钮中添加如下代码 ComponentName componentName=new ComponentName(MainActivity.this,NewActiv ...

  3. 关于Intent的七大属性

    原谅我愚昧,Intent七大属性这个概念我也是昨天才接触到,看了一下,都是一些常用的东西,就是没有总结过,那么今天就来简单总结一下. Intent七大属性是指Intent的ComponentName. ...

  4. 06 Activity的启动模式 Intent的七大属性的总结

    1.Task以及back stack     >Task(任务)  为了完成一个功能  多个Activity的集合,     当你的应用程序启动时 系统会自动创建Task用于管理Activity ...

  5. Intent 的Flag属性(Activity在栈位置的主宰者)

    Intent 的Flag属性可用来控制Activity在栈中的排列位置,本文列举了常见的Flag. 例--(以无动画方式启动ActivityB): Intent intent=new Intent(A ...

  6. Intent的七大属性

    1.Action Action属性代表系统要执行的动作 系统提供如下常用的Action属性 *ACTION_MAIN:应用程序入口点 *ACTION_VIEW:显示指定数据 *ACTION_EDIT: ...

  7. Spring AOP propagation七种属性值

    <!-- 配置事务通知 --> <tx:advice id="advice" transaction-manager="transactionManag ...

  8. Android 之Activity启动模式(二)之 Intent的Flag属性

    首页博客链接关于我留言板 前面介绍了通过launchMode设置Activity的启动模式.本章接着介绍Activity的启动模式相关内容,讲解的内容是Intent与启动模式相关的Flag,以及and ...

  9. python面向对象(七)属性方法的添加

    ​ 通常情况下,当我们定义了一个class,创建了一个class的实例后,我们可以给该实例绑定任何属性和方法,这就是动态语言的灵活性.下来我就讲下添加属性和方法,同时也将下限值添加属性方法. 添加属性 ...

随机推荐

  1. (原)Ubuntu16 中安装torch版的cudnn

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5668471.html 参考网址: https://devtalk.nvidia.com/default ...

  2. jQuery模拟瀑布流布局

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  3. python运维开发(二十一)----文件上传和验证码+session

    内容目录: 文件上传 验证码+session 文件和图片的上传功能 HTML Form表单提交,实例展示 views 代码 HTML ajax提交 原生ajax提交,XMLHttpRequest方式上 ...

  4. 高可用集群(HA)之DRBD原理和基础配置

    目录 1.工作原理图 2.用户空间工具 3.工作模式 4.实现主备故障自动切换 5.所需软件 6.配置文件 7.详细配置     1.配置通用属性信息     2.定义一个资源     3.初始化资源 ...

  5. 【转】Memcached管理与监控工具----MemAdmin

    原文连接:http://blog.csdn.net/ajun_studio/article/details/6746877 原文作者:halfMe 转载注明以上信息! 使用MemCached以后,肯定 ...

  6. [XMPP]iOS聊天软件学习笔记[三]

    今天做了好友界面,其实xmpp内部已经写好很多扩展模块,所以使用起来还是很方便的 开发时间:五天(工作时间) 开发工具:xcode6 开发平台:iOS8 XMPP框架:XMPPFramework gi ...

  7. google浏览器翻译失败解决方案

    用记事本打开 C:\Windows\System32\drivers\etc下hosts文件 在文件末尾加入如下两行 203.208.46.145 translate.google.com 203.2 ...

  8. linux下mysql忘记root密码的解决方案

    1.首先确认服务器出于安全的状态,也就是没有人能够任意地连接MySQL数据库. 因为在重新设置MySQL的root密码的期间,MySQL数据库完全出于没有密码保护的 状态下,其他的用户也可以任意地登录 ...

  9. mongodb GUI

    官网:http://robomongo.org/ 提供Mac .Windows .Linux三种版本: robomongo界面简洁功能强大人性化:

  10. USB封包格式

    1.起始(SOP)封包 根集线器会在每1 ms时,送出SOF封包.这介于2个SOF封包之间的时间,即称为帧(frame).SOF封包虽是属于令牌封包的一种,但却具有独自的PID形态名称SOF.通常目标 ...