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 ...
随机推荐
- Bug解决方案:org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 8; 不允许有匹配 "[xX][mM][lL]" 的处理指令目标
十月 17, 2016 10:14:30 下午 org.springframework.context.support.AbstractApplicationContext prepareRefres ...
- JavaScript设计模式-19.代理模式
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 解决emacs配置tern报错`tern-reparse-on-idle':
使用Nodejs安装完tern后,在/user/local/bin建立软连接
- WPF 自定义NotifyPropertyChanged
该工具类实现INotifyPropertyChanged接口 /// <summary> /// 实现了属性更改通知的基类 /// </summary> public clas ...
- Flex Graphics
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- 利用css实现搜索过滤
无意中找到一种利用css就可实现的搜索过滤的方法,不得不说看了代码之后确实被惊艳到了,亏我之前面试还因为做这个功能做太慢而拖了后腿.在此记录下代码: <!DOCTYPE html> < ...
- oracle 数据库添加Java方法
create or replace and compile java source named "Bitconverter" aspublic class Bitconverter ...
- WCF中的AddressHeader作用
客户端发送请求给服务端,服务端根据请求消息把消息转发给对应的终结点.这里面有个消息筛选机制,如果请求消息中带有地址报头相关信息,则会用地址报头匹配当前的所有终结点.所以默认情况下客户端和服务端的地址报 ...
- SSIS教程:创建简单的ETL包 -- 4. 增加错误处理流程(Adding Error Flow Redirection)
为了处理在转换过程中可能发生的错误,MicrosoftIntegration Services 允许根据每个组件和每个列来决定如何处理无法转换的数据. 可以选择忽略某些列中的失败.重定向整个失败的行或 ...
- lodop打印多页
定义全局变量 var loop = null; 加载时候打印 window.On_CLodop_Opened = function () { print(); //OpenPreview()是调用打印 ...