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 ...
随机推荐
- MongoDB日志文件过大
MongoDB日志文件过大 MongoDB启动的时候指定了--logpath为一个日志文件.随着时间此文件会变得越来越大,达到好几个G. 因为不想让MongoDB进程重新启动,所以不能停止进程删除此文 ...
- Struts html(标签)
一 <html:form> <html:form>用来创建表单,<html:form>必须包含一个action属性,否则JSP会抛出一个异常. 1.常用属性: Ac ...
- PHP之string
string addcslashes() Quote string with slashes in a C style 以 C 语言风格使用反斜线转义字符串中的字符 addslashes() Quot ...
- HaspMap的新奇用法
HashMap<String, String> map = new HashMap<String,String>(){ private static final long se ...
- 基础语言知识C++
强制转换: (Cplusplus基础与提高(何桂林)21页) static_cast:有隐式转换的 格式: static_cast<目标类型> (标识符) int a = 10; int ...
- Gin实战:Gin+Mysql简单的Restful风格的API
我们已经了解了Golang的Gin框架.对于Webservice服务,restful风格几乎一统天下.Gin也天然的支持restful.下面就使用gin写一个简单的服务,麻雀虽小,五脏俱全.我们先以一 ...
- [转]Charts (Report Builder and SSRS)
本文转自:https://docs.microsoft.com/en-us/sql/reporting-services/report-design/charts-report-builder-and ...
- WCF Data Services 5.0 for OData V3
https://www.microsoft.com/en-us/download/details.aspx?id=29306 VS 2010 下 安装 WCF Data Services 5.0 en ...
- mklink /d 目录符号链接
刚装好Windows Live Writer,却发现日志保存路径是默认的改都没法改,在C:\Users\用户名\Documents\My Weblog Posts下. 找了下,竟然可以用cmd的mkl ...
- C# 提高必备精品--你所需要的NET笔记
一. 交换两个数据的值: 1. //创建一个临时变量 //int temp; //temp = num1; ////用num2的值覆盖掉num1 //num1 = num2; ////将存储在临时变 ...