Android应用程序的组成部分
1、activity
应用程序的表示层,activity使用fragment和视图来布局和显示信息,以及响应用户动作。
2、service
应用程序中不可见的工作者
3、content provider
一个可共享的持久数据存储器
4、intent
一个强大的应用程序间的消息传递机制
5、Broadcast receiver
intent的监听器
6、widget
通常添加到设备主屏幕的可视化应用程序组件,用户可以把这些组件添加到他们的主屏幕上
7、notification
允许向用户发送信号,但却不会过分吸引他们的注意力或者打断他们当前的activity
AndroidManifest.xml详解
它存储在项目层次中的最底层,可以定义应用程序及组件和需求的结构和元数据。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lkp.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.lkp.helloworld.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
原文:http://www.cnblogs.com/kpliu/p/4148015.html