注:在《疯狂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. easyui的combobox将得到的数据设定为下拉框默认值和复选框设定默认值

    通过easyui做了一个表,表里是从数据库拿到的数据. 现在双击某一行,通过点击行的id取到这一行的所有数据,现在需要修改这些得到的数据, 其中部分数据是<select>这个选择的, 问题 ...

  2. 多加注意对null和“”的处理

    程序中对一些需要再次取值的引用类型参数,在引用之前,请千万注意对空的判断.当不清晰返回结果是null还是""时,应先判断null,再判断空字符串. LOFTER:我们的故事   h ...

  3. java读取xml(当xml放在包里时)

  4. Python即时网络爬虫项目: 内容提取器的定义(Python2.7版本)

    1. 项目背景 在Python即时网络爬虫项目启动说明中我们讨论一个数字:程序员浪费在调测内容提取规则上的时间太多了(见上图),从而我们发起了这个项目,把程序员从繁琐的调测规则中解放出来,投入到更高端 ...

  5. nginx+keepalived+tomcat之tomcat性能调优

    body{ font-family: Nyala; font-size: 10.5pt; line-height: 1.5;}html, body{ color: ; background-color ...

  6. 清空DNS缓存

    昨天写了个Python的脚本,功能就是爬取一个网页上的Google ip地址再写入到本机的hosts里面去. 但是写完并且运行完成之后发现上不了Google.于是想到了是不是要清空一下DNS的缓存.不 ...

  7. Eratosthenes筛选法计算质数

    <C和指针>第6章第4道编程题: 质数就是只能被1和本身整除的数.Eratosthenes筛选法是一种计算质数的有效方法.这个算法的第一步就是写下所有从2至某个上限之间的所有整数.在算法的 ...

  8. 三星S5360(GALAXY Y)首次刷机尝试~

    刷机包下载: http://www.romjd.com/Device/samsung-s5360 http://www.shuaji.com/rom/2033.htm#down http://www. ...

  9. C# 计划任务

    计划任务 :  个人理解, 就是后台控制程序要求在一定的时间执行相应的任务. 直接上代码: 之前,因为工作需要. 要求每天在凌晨2:00,执行要做的数据 1.1  声明一个接口 Ijob 方法: 执行 ...

  10. Linux删除乱码文件或者目录

    Linux删除乱码文件或者目录 有时在Linux下面解压一些zip或者rar文件后会产生乱码文件或者目录,这个时候使用rm不能成功删除,需要使用一些特别的方法 来进行删除,下面是我经常使用的两种方法. ...