1.Intent指定启动目标组件

2.Intentfilter描述基本组件所在地址

3.其他包引入资源文件时记得引入R所在的包

package com.jikexueyuan.intent;

import com.jiahemeikang.helloandroid.R;
import android.app.Activity;
import android.os.Bundle; public class Aty2 extends Activity{ public Aty2() {
// TODO Auto-generated constructor stub
} @Override
protected void onCreate(Bundle e) {
super.onCreate(e);
setContentView(R.layout.aty2);
}
}

R的包

/* AUTO-GENERATED FILE.  DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/ package com.jiahemeikang.helloandroid; public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines. Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. */
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int action_settings=0x7f08000d;
public static final int bingdingservice=0x7f080000;
public static final int btnClose=0x7f08000b;
public static final int btnGetNum=0x7f080002;
public static final int btnStartAty1=0x7f080009;
public static final int btnStartService=0x7f080003;
public static final int btnStopService=0x7f080004;
public static final int btnbroadcast=0x7f080006;
public static final int btnregbroadcast=0x7f080007;
public static final int btnunregbroadcast=0x7f080008;
public static final int textView1=0x7f080005;
public static final int tvOut=0x7f08000c;
public static final int tvResult=0x7f08000a;
public static final int unbingdingservice=0x7f080001;
}
public static final class layout {
public static final int activity_main=0x7f030000;
public static final int aty1=0x7f030001;
public static final int aty2=0x7f030002;
}
public static final class menu {
public static final int main=0x7f070000;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
}
}

将做好的资源文件加入Android activty加入Android Manifest

Android学习笔记之Intent(1)的更多相关文章

  1. android学习笔记29——Intent/IntentFilter

    Intent/IntentFilter Intent封装android应用程序需要启动某个组件的“意图”,Intent还是应用程序组件之间通信的重要媒介. EG:Activity之间需要交换数据时,使 ...

  2. Android学习笔记之Intent(2)

    打开网页 package com.jiahemeikang.helloandroid; import java.io.File; import com.jiahemikang.service.Echo ...

  3. Android学习笔记之Intent

    Intent是Activity之间的管道 可以用来做Acitivity的跳转或传递数据 protected void onCreate(Bundle savedInstanceState) { sup ...

  4. 【转】Pro Android学习笔记(十二):了解Intent(下)

    解析Intent,寻找匹配Activity 如果给出component名字(包名.类名)是explicit intent,否则是implicit intent.对于explicit intent,关键 ...

  5. 【转】Pro Android学习笔记(十):了解Intent(上)

    目录(?)[-] Intent基本含义 系统的Intent Android引入了Intent的概念来唤起components,component包括:1.Activity(UI元件) 2.Servic ...

  6. Android学习笔记之Activity详解

    1 理解Activity Activity就是一个包含应用程序界面的窗口,是Android四大组件之一.一个应用程序可以包含零个或多个Activity.一个Activity的生命周期是指从屏幕上显示那 ...

  7. Pro Android学习笔记 ActionBar(1):Home图标区

     Pro Android学习笔记(四八):ActionBar(1):Home图标区 2013年03月10日 ⁄ 综合 ⁄ 共 3256字 ⁄ 字号 小 中 大 ⁄ 评论关闭 ActionBar在A ...

  8. 【转】Pro Android学习笔记(九八):BroadcastReceiver(2):接收器触发通知

    文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.sina.com.cn/flowingflying或作者@恺风Wei-傻瓜与非傻瓜 广播接 ...

  9. 【转】 Pro Android学习笔记(七七):服务(2):Local Service

    目录(?)[-] Local service代码 调用Local ServiceLocal Service client代码 AndroidManifestxml定义Serviceacitivty的l ...

随机推荐

  1. centos6.5中gitlab的搭建

    使用gitlab官网给的源码进行安装,步骤如下: Install a GitLab CE Omnibus package on CentOS 6 (and RedHat/Oracle/Scientif ...

  2. 还在纠结 Flux 或 Relay,或许 Redux 更适合你

    重磅消息,Redux 1.0 发布,终于可以放心用于生产环境了! 在这个端应用技术膨胀的时代,每天都有一大堆框架冒出,号称解决了 XYZ 等一系列牛 X 的问题,然后过一段时间就不被提起了.但开发的应 ...

  3. usb-to-isp-for-stm32

  4. block 的演练和使用

    概念 block 是 C 语言的 是一种数据类型,可以当作参数传递 是一组预先准备好的代码,在需要的时候执行 动画 block 回顾 self.demoView.center = CGPointMak ...

  5. JPA 系列教程7-双向多对多

    双向多对多的ddl语句 同单向多对多表的ddl语句一致 Student package com.jege.jpa.many2many; import java.util.HashSet; import ...

  6. Java获取来访者IP

    在JSP里,获取客户端的IP地址的方法是:request.getRemoteAddr(),这种方法在大部分情况下都是有效的.但是在通过了Apache,Squid等反向代理软件就不能获取到客户端的真实I ...

  7. java int和Integer的区别

    今天偶然和同学讨论到int和Integer的区别是,发现自己对这个问题了解的并不是很清楚,而且有些概念还是错的,所以在这对int和Integer的区别做一个总结. int与integer的区别从大的方 ...

  8. Json解析异常处理方式(JSONException: Value of type java.lang.String cannot be converted to JSONObject)

    有一次从服务器解析获取到的Json字符串突然报了这个异常,由于这个json是从 php页面上推送过来的,当时就查是不是由于编码问题引起的,所以就上网搜了,网上大部分都是说由于utf-8的bom头引起的 ...

  9. AutoFac使用方法总结

    AutoFac是.net平台下的IOC容器产品,它可以管理类之间的复杂的依赖关系.在使用方面主要是register和resolve两类操作. 这篇文章用单元测试的形式列举了AutoFac的常用使用方法 ...

  10. ASP.NET Cache 类

    在查找资料的过程中.原来园子里面已经有过分析了.nopCommerce架构分析系列(二)数据Cache. 接下来是一些学习补充. 1.Nop中没有System.Web.Caching.Cache的实现 ...