注:在《疯狂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. OpenCV——Rect矩阵类

    成员变量x.y.width.height,分别为左上角点的坐标和矩形的宽和高. 常用的成员函数有: Size()返回值为一个Size area()返回矩形的面积 contains(Point)用来判断 ...

  2. YUI之数组操作

    YUI的构建数组,将类数组转换成真正的数组,从而可以使用数组的所有方法   数组构建 //真正的数组返回1,类数组返回2,其余的返回0 YArray.test = function (obj) { v ...

  3. Java 枚举随笔

    public enum Color{ //定义枚举并赋值 RED("红色", 1), Blue("蓝色", 2), Yellow("黄色", ...

  4. commons-logging 和 log4j 之间的关系

    我们在做项目时,日志的记录是必不可少的一项任务,而我们通常是使用 apache 的 log4j 日志管理工具.然而,在项目中,我们经常会看到两个 jar 包:commons-logging.jar 和 ...

  5. android 常用颜色

    reference: http://blog.csdn.net/leewenjin/article/details/17386265

  6. Windows安装TensorFlow-Docker Installation of TensorFlow on Windows

    TensorFlow是Google开发的进行Deep Learning的包,目前只是支持在Linux和OSX上运行.不过这个秋季或许就有支持Windows的版本出现了,那么对于使用Windows的开发 ...

  7. Python Challenge 过关心得(1)

    正式开始第1关,这一关的URL的特殊部分是map. 这关的图片上有一个本子,上面写着K→M,O→Q,E→G,稍微思索就能发现这几个字母都是按照字母表的顺序向后移动了两位,那么最投机取巧的方法就是把ma ...

  8. 关于hibernate非主键多对一关联

    一直以来,用hibernate做多对一时,关联的都是主键,今天,同事设计的表,关联的却不是主键,这下麻烦了,hibernate的many-to-one默认关联的都是主键,原来,hibernate提供了 ...

  9. Html 编码 queryUrl = encodeURI(queryUrl);

    Html  编码 queryUrl = encodeURI(queryUrl);

  10. JS+html实现简单的飞机大战

    摘要:通过原生的js+html实现简单的飞机大战小游戏效果,如图所示: 实现代码如下: 1.自己的飞机实现 飞机html: <!DOCTYPE html> <html lang=&q ...