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

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android中TextView中如何设置水平滚动效
  2. Android上实现柱状图表 可实现边框矩形
  3. 一鍵ROOT機的Android程式《Universal And
  4. iOS 与 Android(安卓)之战,乔布斯是否正在
  5. Android(安卓)App检测新版本,自动下载、安
  6. 【移动开发】Android中一些你可能不太知
  7. [置顶] android中使用jni对字符串加解密
  8. Android(安卓)应用开发的耗电量控制
  9. Android(安卓)的SimpleAdapter几点认识
  10. Android实现推送方式解决方案