android(2)——Structure of an Android Application
1 structure of an android application
An Android application is primarily made up of three pieces: the application descriptor, a collection of various resources, and the application's source code.
It is also worth noting a few constraints regarding resources.
- Android supports only a linear list of files within the predefined folders under res.
- The contents of the assets folders are not considered resources, but the files within raw under res are.
2 Dissecting the Application
- Android defines an entry-point activity, also called the top-level activity.
- When an Android app is asked to run ,the host loads the application and reads the AndroidManifest.xml file. It then looks for, and starts, an activity or activities with an intent-filter that has the MAIN action with a category of LAUNCHER.
- Once the entry-point activity is determined, the host starts the activity and the onCreate() method is called.
- Activities in Android are usually started with an intent , and one activity can start another activity.
- Activities have a defined lifecycle. They are maintained on an activity, with the running activity at the top. If the running activity starts another activity, the first running activity moves down the stack and the new activity is placed on the top.
- ContentProvider class defines six abstract methods, four of which are CRUD(Create, Read, Update, Delete)operations. The other two abstract methods are onCreate() and getType(). onCreate() is called when the content provider is created for the first time;
getType() provides the MIME type for the result set. - DatabaseHelper class
android(2)——Structure of an Android Application的更多相关文章
- Android菜鸟成长记13 -- 初识application
二.Application 简介 Application 类是用来维护应用程序全局状态.你可以提供自己的实现,并在 AndroidManifest.xml文件的 <application> ...
- Android开发之Intent的传值--Application
每当我们想要将输入的值传递到多个界面时,只是使用Intent传值的话,就会有一些的弊端. 下面我就以三个页面为例,进行简单的说明一下: 思路: 1.第一个页面是客户输入相关的信息. 2.将客户输入的信 ...
- Android学习笔记(三)Application类简介
每次运行APP时,Application类都保持实例化状态.与Activity不同,配置改变不会导致应用程序重启.通过继承Application类,可以完成一下3项工作: · 对Android运行时广 ...
- 【Android进阶】在开发中Application到底用来做什么
首先,在一个Android程序中,有且只有一个Application对象,在程序开始跑起来的时候,首先执行Application的onCreate方法,这是一个Android应用的入口,在开发中,我们 ...
- Android 热修复方案Tinker(一) Application改造
基于Tinker V1.7.5 Android 热修复方案Tinker(一) Application改造 Android 热修复方案Tinker(二) 补丁加载流程 Android 热修复 ...
- 【Android Api 翻译4】android api 完整翻译之Contacts Provider (学习安卓必知的api,中英文对照)
Contacts Provider 电话簿(注:联系人,联络人.通信录)提供者 ------------------------------- QUICKVIEW 快速概览 * Android's r ...
- 【Android Api 翻译1】Android Texting(2)Testing Fundamentals 测试基础篇
Testing Fundamentals The Android testing framework, an integral part of the development environment, ...
- 4.Android 打包时出现的Android Export aborted because fatal error were founds [closed]
Android 程序开发完成后,如果要发布到互联网上供别人使用,就需要将自己的程序打包成Android 安装包文件(Android Package,APK),其扩展名为.apk.使用run as 也能 ...
- 【Android】一种提高Android应用进程存活率新方法
[Android]一种提高Android应用进程存活率新方法 SkySeraph Jun. 19st 2016 Email:skyseraph00@163.com 更多精彩请直接访问SkySeraph ...
随机推荐
- ubuntu关闭时间同步与centos更改时间
环境:ubuntu 源于一次项目需要修改系统时间,但是每次修改后又被同步回网络时间,找了好久发现是这个原因: NTP即Network Time Protocol(网络时间协议),是一个互联网协议,用于 ...
- C#中判断系统的架构(32位,还是64位)
一种很简单的方法就是根据IntPtr类型的Size属性来判断, //IntPtr.Size在64位为8,在32位为4 public static Boolean Is64Bit() { ) retur ...
- 有关索引的DMV
转自:http://www.cnblogs.com/CareySon/archive/2012/05/17/2505981.html#commentform 有关索引的DMV 1.查看那些被大量更新, ...
- Greenplum表定义
GP中的table和其它关系型数据表是一样的,除了数据被分布在不同的segment以外. 在建表的时候必须申明分布键distribution policy. 建表需定义下面几个方面: 1. 指定列和数 ...
- H5微信自定义分享链接(设置标题+简介+图片)
起源:最近公司在做招募广告的html5页面,然后做出来后,产品提出一个问题,需要分享出去的链接是卡片形式,内容也要自己定义,这下就难到我了,因为是第一次遇到这种需求,果断百度,然而,我就像大家一样,看 ...
- SQLite数据类型(学习必备)
最近在学习android端的数据库,以下知识点作为备用- 一.存储种类和数据类型: SQLite将数据值的存储划分为以下几种存储类型: NULL: 表示该值为NULL值. INTEGE ...
- Command操作数据
Command常用属性 CommandText 要下达至数据源的命令 CommandTimeout 出错时等待时间 //定义一个变量来存储对数据库操作的字符串 ...
- 网站压力测试 工具webbench
webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好用,安装使用也特别方便,并且非常小. 主要是 -t 参数用着比较爽,下面参考了张宴的文章 ...
- org.apache.commons.lang.StringUtils
org.apache.commons.lang.StringUtils 作为jdk中lang包的补充 检查CharSequence是否为空,null或者空格 CharSequence (CharBuf ...
- shell文本操作
一.find查找命令的使用 1.find . -name "*.txt" 在当前目录下,查找以txt结尾的文件 2.find . -name "[a-z]" 在 ...