Android 4学习(2):概述 - AndroidManifes.xml
Android应用程序包含下面这几个部分:
程序的前后台:
- Activities
- Services
- Content Providers
- Intents
- Broadcast Receivers
- Widgets
- Notifications
Android Manifest
- android应用的结构信息
- Activity,Service,Content Provider,Broadcast Receiver
- Intent Filter
- 元数据。
- 版本号,图标,主题等
AndroidManifest.xml中的标签
- uses-sdk:顾名思义
- <uses-sdk android:minSdkVersion=”6” android:targetSdkVersion=”15”/>
- uses-configuration:硬件的配置信息
- <uses-configuration android:reqTouchScreen=”finger” android:reqNavigation=”trackball” android:reqHardKeyboard=”true” android:reqKeyboardType=”twelvekey”/>
- uses-feature:程序运行所需要的硬件支持
- supports-screens:顾名思义
- <supports-screens android:smallScreens=”false”
android:normalScreens=”true”
android:largeScreens=”true”
android:xlargeScreens=”true”
android:requiresSmallestWidthDp=”480”
android:compatibleWidthLimitDp=”600”
android:largestWidthLimitDp=”720”/>
- <supports-screens android:smallScreens=”false”
- supports-gl-texture:声明这个应用程序是否能提供由一种GL压缩格式的asset
- <supports-gl-texture android:name=”GL_OES_compressed_ETC1_RGB8_texture” />
- uses-permission
- <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”/>
- permission:用户自定义的permission
- <permission android:name=”com.paad.DETONATE_DEVICE”
android:protectionLevel=”dangerous”
android:label=”Self Destruct”
android:description=”@string/detonate_description”>
</permission>
- <permission android:name=”com.paad.DETONATE_DEVICE”
- instrumentation:测试相关
- <instrumentation android:label=”My Test”
android:name=”.MyTestClass”
android:targetPackage=”com.paad.apackage”>
</instrumentation>
- <instrumentation android:label=”My Test”
- application:一个manifest文件中只能有一个application标签
- <application android:icon=”@drawable/icon”
android:logo=”@drawable/logo”
android:theme=”@android:style/Theme.Light”
android:name=”.MyApplicationClass”
android:debuggable=”true”>
[ ... application nodes ... ]
</application> - 子标签:activity
- <activity android:name=”.MyActivity” android:label=”@string/app_name”>
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
<category android:name=»android.intent.category.LAUNCHER» />
</intent-filter>
</activity>
- <activity android:name=”.MyActivity” android:label=”@string/app_name”>
- 子标签:service
- <service android:name=”.MyService”></service>
- 子标签:provider
- <provider android:name=”.MyContentProvider” android:authorities=”com.paad.myapp.MyContentProvider”/>
- 子标签:receiver
- <receiver android:name=”.MyIntentReceiver”>
<intent-filter>
<action android:name=”com.paad.mybroadcastaction” />
</intent-filter>
</receiver>
- <receiver android:name=”.MyIntentReceiver”>
- 子标签:uses-library
- <uses-library android:name=”com.google.android.maps” android:required=”false”/>
- <application android:icon=”@drawable/icon”
Android 4学习(2):概述 - AndroidManifes.xml的更多相关文章
- Android开发学习---使用XmlPullParser解析xml文件
Android中解析XML的方式主要有三种:sax,dom和pull关于其内容可参考:http://blog.csdn.net/liuhe688/article/details/6415593 本文将 ...
- Android UI学习组件概述
Android的UI组件繁多,如果学习的时候不能自己总结和分类而是学一个记一个不去思考和学习他们内在的联系那真的是只有做Farmer的命了.为了向注定成为Farmer的命运抗争,在学习Android的 ...
- Android动画学习(二)——Tween Animation
前两天写过一篇Android动画学习的概述,大致的划分了下Android Animation的主要分类,没有看过的同学请移步:Android动画学习(一)——Android动画系统框架简介.今天接着来 ...
- Android Animation学习(三) ApiDemos解析:XML动画文件的使用
Android Animation学习(三) ApiDemos解析:XML动画文件的使用 可以用XML文件来定义Animation. 文件必须有一个唯一的根节点: <set>, <o ...
- 八、Android学习第七天——XML文件解析方法(转)
(转自:http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html) 八.Android学习第七天——XML文件解析方法 XML文件:exten ...
- Android开发学习之路--网络编程之xml、json
一般网络数据通过http来get,post,那么其中的数据不可能杂乱无章,比如我要post一段数据,肯定是要有一定的格式,协议的.常用的就是xml和json了.在此先要搭建个简单的服务器吧,首先呢下载 ...
- Android 4学习(3):概述 - Resources
在应用程序中,处理与代码逻辑无关资源的最佳实践是将其放到程序的外部,典型的资源包括字符串,图片等.Android中的资源文件都在res文件夹中,这些资源包括字符串,颜色,主题,样式,图画,布局,动画, ...
- android菜鸟学习笔记3----关于AndroidMainfest.xml
每个android项目都包含一个AndroidMainfest.xml文件,它包含了组成应用程序的每一个Acitivity.Service.Content Provider和Broadcast Rec ...
- Android:日常学习笔记(8)———探究UI开发(5)
Android:日常学习笔记(8)———探究UI开发(5) ListView控件的使用 ListView概述 A view that shows items in a vertically scrol ...
随机推荐
- Spring boot学习整理
目录: Springboot结合hbase Springboot结合elasticsearch Springboot结合RestTemplate处理Http请求 Springboot的maven相关 ...
- Intel Code Challenge Elimination Round (Div.1 + Div.2, combined) D. Generating Sets 贪心+优先队列
D. Generating Sets time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- 关于sublime text 3 pylinter的错误提示
刚开始用windows下sublime text 3写python,搭建完以后,按ctrl+b可以build,然后保存时候一直提示. Fatal pylint error: x:/python: ca ...
- python直接赋值,浅拷贝和深拷贝
本文参考自<Python 直接赋值.浅拷贝和深度拷贝解析> 定义 直接赋值:就是对象的引用(别名) 浅拷贝(copy):拷贝父对象,不拷贝对象内部的子对象 深拷贝(deepcopy):co ...
- JVM 知识点总览 - 高级 Java 工程师面试必备
在江湖中要练就绝世武功必须内外兼备,精妙的招式和深厚的内功,武功的基础是内功.对于武功低(就像江南七怪)的人,招式更重要,因为他们不能靠内功直接去伤人,只能靠招式,利刃上优势来取胜了,但是练到高手之后 ...
- hzau 1203 One Stroke
1203: One Stroke Time Limit: 2 Sec Memory Limit: 1280 MBSubmit: 264 Solved: 56[Submit][Status][Web ...
- nyojb 2357
http://acm.nyist.me/JudgeOnline/problem.php?id=2357 2357: 插塔憋憋乐 时间限制: 1 Sec 内存限制: 128 MB提交: 50 解决: ...
- GEF入门实例_总结_03_显示菜单和工具栏
一.前言 本文承接上一节: GEF入门实例_总结_02_新建初始RCP空项目 这一节,我们来给我们的插件加上菜单. 二.基础知识 1.action bar.menubar.coolbar 含义 a ...
- 应该是实例化对象的没有对属性赋值时,自动赋值为null,但不是空指针对象引用
此时会输出两个null. Users类的实例是myUsers,但是由于javabean的作用范围是page,所以前面页面传送的javabean的设置的属性全部不能接收到.所以对象myUsers属性为自 ...
- 魔法效果——dijkstra+堆(邻接表存储)
dijkstra本身每次要for一遍,才能找出最小的节点,但用了堆之后,直接取出堆首就可以了. 但要注意的一点是,c++自带的stl里的priority_queue本身是先入大出的,而我们要求的是最小 ...