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

  1. Android defines an entry-point activity, also called the top-level activity.
  2. 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.
  3. Once the entry-point activity is determined, the host starts the activity and the onCreate() method is called.
  4. Activities in Android are usually started with an intent , and one activity can start another activity.
  5. 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.
  6. 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.
  7. DatabaseHelper class

android(2)——Structure of an Android Application的更多相关文章

  1. Android菜鸟成长记13 -- 初识application

    二.Application 简介 Application 类是用来维护应用程序全局状态.你可以提供自己的实现,并在 AndroidManifest.xml文件的 <application> ...

  2. Android开发之Intent的传值--Application

    每当我们想要将输入的值传递到多个界面时,只是使用Intent传值的话,就会有一些的弊端. 下面我就以三个页面为例,进行简单的说明一下: 思路: 1.第一个页面是客户输入相关的信息. 2.将客户输入的信 ...

  3. Android学习笔记(三)Application类简介

    每次运行APP时,Application类都保持实例化状态.与Activity不同,配置改变不会导致应用程序重启.通过继承Application类,可以完成一下3项工作: · 对Android运行时广 ...

  4. 【Android进阶】在开发中Application到底用来做什么

    首先,在一个Android程序中,有且只有一个Application对象,在程序开始跑起来的时候,首先执行Application的onCreate方法,这是一个Android应用的入口,在开发中,我们 ...

  5. Android 热修复方案Tinker(一) Application改造

    基于Tinker V1.7.5 Android 热修复方案Tinker(一) Application改造    Android 热修复方案Tinker(二) 补丁加载流程    Android 热修复 ...

  6. 【Android Api 翻译4】android api 完整翻译之Contacts Provider (学习安卓必知的api,中英文对照)

    Contacts Provider 电话簿(注:联系人,联络人.通信录)提供者 ------------------------------- QUICKVIEW 快速概览 * Android's r ...

  7. 【Android Api 翻译1】Android Texting(2)Testing Fundamentals 测试基础篇

    Testing Fundamentals The Android testing framework, an integral part of the development environment, ...

  8. 4.Android 打包时出现的Android Export aborted because fatal error were founds [closed]

    Android 程序开发完成后,如果要发布到互联网上供别人使用,就需要将自己的程序打包成Android 安装包文件(Android Package,APK),其扩展名为.apk.使用run as 也能 ...

  9. 【Android】一种提高Android应用进程存活率新方法

    [Android]一种提高Android应用进程存活率新方法 SkySeraph Jun. 19st 2016 Email:skyseraph00@163.com 更多精彩请直接访问SkySeraph ...

随机推荐

  1. nginx图片处理笔记(http-image-filter-module、lua)

    实验环境:CentOS 6.10 目标:1.使用http-image-filter-module进行图片变换:2.使用lua进行格式转换: 安装EPEL https://fedoraproject.o ...

  2. javascript中的function 函数名(){} 和 函数名:function(){}有什么不同

    function functionName(){};这是定义一个函数 functionName:function(){};是设置一个对象的方法. 下面举一个例子: <html> <h ...

  3. 安装Postgresql之后,创建用户 配置rails

    登录 sudo su - postgres psql 1 创建Postgresql新用户,devpg是用户名,密码也是devpg, 不是超级管理员,拥有创建数据库权限,登录权限,继承拥有角色权限 cr ...

  4. python 多线程与GIL

    GIL 与 Python 线程的纠葛 GIL 是什么?它对 python 程序会产生怎样的影响?我们先来看一个问题.运行下面这段 python 代码,CPU 占用率是多少? # 请勿在工作中模仿,危险 ...

  5. JS Date函数在safari中的问题

    问题描述:在做Web的时候,在PC上用Chrome调试成功,但是在safari一测就出现了问题.经过debug发现是日期相关出现问题.查阅一些资料后发现,safari中对于JavaScript的Dat ...

  6. Orchard源码:缓存设计

    概述 从缓存失效的几种方式开始了解Orchard缓存设计 1.设置失效时间 Func<int> retrieve = () => _cacheManager.Get("te ...

  7. zabbix自动发现与自动注册及SNMP监控

    自动发现与自动注册 自动发现:zabbix Server主动发现所有客户端,然后将客户端登记自己的小本本上,缺点zabbix server压力山大(网段大,客户端多),时间消耗多. 自动注册:zabb ...

  8. WPF判断两个时间大小避免误差

    进行查询操作的时候,经常用到判断开始时间和结束时间大小的条件,由于从控件上获取的时间除了年月日时分秒,还包括毫秒.微秒等,导致直接判断时间大小的时候会产生一些误差,如下: 结果分析:年月日时分秒一致的 ...

  9. js弹出遮层

    <script> var docEle = function () { return document.getElementById(arguments[0]) || false; } f ...

  10. Vue学习笔记:methods、computed、watch的区别

    自:https://www.jb51.net/article/120073.htm 首先要说,methods,watch和computed都是以函数为基础的,但各自却都不同 而从作用机制和性质上看,m ...