Android Components
Manifest文件
Resource and Assets

v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}

Normal
0
false

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-font-kerning:1.0pt;}

Android Components:

@、Activity、Services、BroadcastReceivers、ContentProviders、Application。

@、Activity

1、  负责user interface。

2、  Android 3.0(Honeycomb)开始,使用Fragment实现界面动态调整。

@、Services

1、  实现后台执行操作。

@、BroadcastReceivers

1、  监听系统事件。

@、ContentProviders

1、  存储数据。

@、Application

1、开发前,使用组件来构造应用的框架。暂时只描述组件的功能,而不需完整设计好。

Manifest文件:

@、<manifest>的属性可以定义:应用的包名,唯一标志符(package),应用运行的Linux用户id(sharedUserId)和名称(sharedUserLabel),版本信息(versionCode, versionName),安装位置(installLocation)。

@、<user-feature>描述安装此应用需要的条件。用于Google Play进行过滤。

You can find a complete list of all the standard features in Android at

http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference

@、<supports-screens>描述安装此应用需要的屏幕大小。

@、<uses-sdk>描述应用的Android版本(minSdkVersion, maxSdkVersion, targetSdkVersion)。如果可能的话,最好不指定maxSdkVersion。

You can find a complete list of all API levels and which Android version they represent at

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

@、<application>

name:当使用自定义的应用类时,可通过此属性指定对应的类名,否则不需要使用此属性。

backupAgent:指定用来备份的类,用来帮助用户进行应用迁移而不丢失应用的数据。

largeHeap:最大内存需求,当设备内存小于此设置时,系统极可能就会终止应用,不建议使用此属性。

process:具有同个用户id(在<manifes>中指定的sharedUserId)的应用,如果此属性设置一样,则会强制使用相同的进程。这种情况,如果一个应用崩溃将影响使用同一进程的其他应用。

theme:设置整个应用的主题。注:Activities可以独立设置主题。

@、组件属性

enabled:如果设置为false,Activities不会显示;Services不会对startService方法作出反应;BroadcastReceivers不会监听BroadcastIntents;ContentProviders不会回应ContentResolver。

exported:如果设置为false,则不会暴露给系统的其他应用。

@、<intent-filter>依赖因素:<action>、<category>、<data>

You can read more about Intents and Intent resolution for Android at

http://developer.android.com/guide/components/intents-filters.html

Resources and Assets:

@、You can find a list of all the resource qualifiers, their order of precedence, and their meaning at http://developer.android.com/guide/topics/resources/providing-resources.html#table2

@、You can find detailed rules on formatting resource strings in the JavaDoc for the java.util.

Formatter class at http://developer.android.com/reference/java/util/Formatter.html

@、<plurals>,在代码中通过getQuantityString()获取值。

@、Localization:

You can access the Google Translator Toolkit at http://translate.google.com/toolkit

@、A great site for finding the mobile country codes (MCC) and mobile network code (MNC) values for various carriers and countries is www.mcc-mnc.com

@、从Android 2.3开始,resource文件大小限定为1M。而在assets目录下的没有限制。

v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}

Normal
0
false

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-font-kerning:1.0pt;}

Android Programming: Pushing the Limits -- Chapter 3: Components, Manifests, and Resources的更多相关文章

  1. Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- ApiWrapper

    前面两片文章讲解了通过AIDL和Messenger两种方式实现Android IPC.而本文所讲的并不是第三种IPC方式,而是对前面两种方式进行封装,这样我们就不用直接把Aidl文件,java文件拷贝 ...

  2. Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- Messenger

    Messenger类实际是对Aidl方式的一层封装.本文只是对如何在Service中使用Messenger类实现与客户端的通信进行讲解,对Messenger的底层不做说明.阅读Android Prog ...

  3. Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- AIDL

    服务端: 最终项目结构: 这个项目中,我们将用到自定义类CustomData作为服务端与客户端传递的数据. Step 1:创建CustomData类 package com.ldb.android.e ...

  4. Android Programming: Pushing the Limits -- Chapter 5: Android User Interface Operations

    多屏幕 自定义View 多屏幕 @.Android 4.2 开始支持多屏幕. @.举例: public class SecondDisplayDemo extends Activity { priva ...

  5. Android Programming: Pushing the Limits -- Chapter 4: Android User Experience and Interface Design

    User Stories Android UI Design 附加资源 User Stories: @.通过写故事来设计应用. @.每个故事只关注一件事. @.不同的故事可能使用相同的组件,因此尽早地 ...

  6. Android Programming: Pushing the Limits -- Chapter 2: Efficient Java Code for Android

    Android's Dalvik Java 与 Java SE 进行比较 Java代码优化 内存管理与分配 Android的多线程操作 Android’s Dalvik Java 与 Java SE ...

  7. Android Programming: Pushing the Limits -- Chapter 1: Fine-Tuning Your Development Environment

    ADB命令 Application Exerciser Monkey Gradle ProGuard 代码重用 版本控制 静态代码分析 代码重构 开发者模式   ADB命令: @.adb help:查 ...

  8. Android Programming: Pushing the Limits -- Chapter 6: Services and Background Tasks

    什么时候使用Service 服务类型 开启服务 后台运行 服务通信 附加资源 什么时候使用Service: @.任何与用户界面无关的操作,可移到后台线程,然后由一个Service来控制这个线程. 服务 ...

  9. [iOS翻译]《iOS 7 Programming Pushing the Limits》系列:你可能不知道的Objective-C技巧

    简介: 如果你阅读这本书,你可能已经牢牢掌握iOS开发的基础,但这里有一些小特点和实践是许多开发者并不熟悉的,甚至有数年经验的开发者也是.在这一章里,你会学到一些很重要的开发技巧,但这仍远远不够,你还 ...

随机推荐

  1. Interleaving String leetcode

    Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = ...

  2. [BZOJ3991][SDOI2015]寻宝游戏

    [BZOJ3991][SDOI2015]寻宝游戏 试题描述 小B最近正在玩一个寻宝游戏,这个游戏的地图中有N个村庄和N-1条道路,并且任何两个村庄之间有且仅有一条路径可达.游戏开始时,玩家可以任意选择 ...

  3. php中0," ",null和false的区别

    php中很多还不懂php中0,"",null和false之间的区别,这些区别有时会影响到数据判断的正确性和安全性,给程序的测试运行造成很多麻烦.先看一个例子: <? $str ...

  4. 2016年11月6日--form表单验证和事件、正则表达式

    1.表单验证<form></form> (1).非空验证(去空格) (2).对比验证(跟一个值对比) (3).范围验证(根据一个范围进行判断) (4).固定格式验证:电话号码, ...

  5. PyQt4多线程定时刷新控件

    1.通过事件关联和线程关联的方法刷新控件 self.listview=updatelistview()self.listview.updateText.connect(self.viewlist)   ...

  6. wordpress迁移到本地404错误

    线上wordpress迁移到本地可能出现找不到页面问题,可能是因为配置了url静态化,同时wordpress的文章链接是存在数据库中的 下面替换掉原来线上的文章链接,其中数据库名为wordpress ...

  7. linux下logrotate 配置和理解

    对于Linux 的系统安全来说,日志文件是极其重要的工具.系统管理员可以使用logrotate 程序用来管理系统中的最新的事件,对于Linux 的系统安全来说,日志文件是极其重要的工具.系统管理员可以 ...

  8. haproxy simple cfg

    global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy user haproxy group hap ...

  9. 【Nginx】nginx 代理 Haproxy 怎么设置?

    由于Haproxy是通过 url 正则匹配 识别 的,nginx代理到 haproxy需要设置 proxy_set_header Host 为 haproxy的目标 url 直接上配置 upstrea ...

  10. Linux之图形化shell------dialog

    转自:Linux dialog详解(图形化shell) | 运维生存时间 对话 UNIX: 使用 shell 脚本创建好的图形应用程序---http://www.ibm.com/developerwo ...