Android学习笔记之Intent(1)
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)的更多相关文章
- android学习笔记29——Intent/IntentFilter
Intent/IntentFilter Intent封装android应用程序需要启动某个组件的“意图”,Intent还是应用程序组件之间通信的重要媒介. EG:Activity之间需要交换数据时,使 ...
- Android学习笔记之Intent(2)
打开网页 package com.jiahemeikang.helloandroid; import java.io.File; import com.jiahemikang.service.Echo ...
- Android学习笔记之Intent
Intent是Activity之间的管道 可以用来做Acitivity的跳转或传递数据 protected void onCreate(Bundle savedInstanceState) { sup ...
- 【转】Pro Android学习笔记(十二):了解Intent(下)
解析Intent,寻找匹配Activity 如果给出component名字(包名.类名)是explicit intent,否则是implicit intent.对于explicit intent,关键 ...
- 【转】Pro Android学习笔记(十):了解Intent(上)
目录(?)[-] Intent基本含义 系统的Intent Android引入了Intent的概念来唤起components,component包括:1.Activity(UI元件) 2.Servic ...
- Android学习笔记之Activity详解
1 理解Activity Activity就是一个包含应用程序界面的窗口,是Android四大组件之一.一个应用程序可以包含零个或多个Activity.一个Activity的生命周期是指从屏幕上显示那 ...
- Pro Android学习笔记 ActionBar(1):Home图标区
Pro Android学习笔记(四八):ActionBar(1):Home图标区 2013年03月10日 ⁄ 综合 ⁄ 共 3256字 ⁄ 字号 小 中 大 ⁄ 评论关闭 ActionBar在A ...
- 【转】Pro Android学习笔记(九八):BroadcastReceiver(2):接收器触发通知
文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.sina.com.cn/flowingflying或作者@恺风Wei-傻瓜与非傻瓜 广播接 ...
- 【转】 Pro Android学习笔记(七七):服务(2):Local Service
目录(?)[-] Local service代码 调用Local ServiceLocal Service client代码 AndroidManifestxml定义Serviceacitivty的l ...
随机推荐
- webstrom管理git
先写一段 webstrom文件名变色:1.绿色的文件添加 2.蓝色的原有文件修改 如果出现““No such file or directory”或类似的语句,说明缺少ssh的key.那么我们就得创建 ...
- MySQL数据表中内容大小写区分的设置
MYSQL在默认的情况下查询是不区分大小写的,例如: ? 1 2 3 4 5 6 7 mysql> create table t1( -> name varchar(10)); Qu ...
- Ajax及select级联
cascade.jsp(Test/WebContent/jsp/cascade.jsp): <%@ page language="java" contentType=&quo ...
- http get with body data
http://stackoverflow.com/questions/978061/http-get-with-request-body Yes, you can send a request bod ...
- replication factor
http://www.tuicool.com/articles/RJbIBj 关于Hadoop中replication factor解惑 时间 2014-06-09 08:00:50 ITeye ...
- 【一题多解】 map 二分 hash trie poj 2503
各种方式解这道题!! 利用map 超时了 #include <iostream> #include <string> #include <map> using na ...
- 【PHP伪静态】时获取不规则的URL参数
$url = explode('/', '/article/category-5/status-2/page-3'); $params = array(); foreach ($url as $v) ...
- Notes over compiling..
When compiling VIM on windows, using nmake may be a better choice.. Because so far my attempts to co ...
- maven项目转成web项目
1.右键项目,Install Dynamic Web Module Facet
- poj 2594 Treasure Exploration(最小路径覆盖,可重点)
题意:选出最小路径覆盖图中所有点,路径可以交叉,也就是允许路径有重复的点. 分析:这个题的难点在于如何解决有重复点的问题-方法就是使用Floyd求闭包,就是把间接相连的点直接连上边,然后就是求最小路径 ...