<manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="string"
android:sharedUserId="string"
android:sharedUserLabel="string resource"
android:versionCode="integer"
android:versionName="string"
android:installLocation=["auto" | "internalOnly" | "preferExternal"] >
. . .
</manifest>
xmlns:android 明命名空间
package 包名
android:sharedUserId 相同的 shareUserId 可以互相访问
android:sharedUserLabel 设置分享的label
android:versionCode 版本号
android:versionName
android:installLocation insternalOnly 只安装到内部; auto 默认安装到 手机的存储中,也可以安装到 外部存储中, preferExternal 只能安装到外部
<action>
<activity>
<activity-alias> 别名可以方便指定一个acitivity
<application android:allowTaskReparenting=["true" | "false"]
android:backupAgent="string"
android:debuggable=["true" | "false"]
android:description="string resource"
android:enabled=["true" | "false"]
android:hasCode=["true" | "false"]
android:hardwareAccelerated=["true" | "false"]
android:icon="drawable resource"
android:killAfterRestore=["true" | "false"]
android:label="string resource"
android:logo="drawable resource"
android:manageSpaceActivity="string"
android:name="string"
android:permission="string"
android:persistent=["true" | "false"]
android:process="string"
android:restoreAnyVersion=["true" | "false"]
android:taskAffinity="string"
android:theme="resource or theme"
android:uiOptions=["none" | "splitActionBarWhenNarrow"] >
. . .
</application>
<compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <!-- all normal size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> </compatible-screens>
>
</application>
- <action>
- <activity>
- <activity-alias>
- <application>
- <category>
- <compatible-screens>
- <data>
- <grant-uri-permission>
- <instrumentation>
- <intent-filter>
- <manifest>
- <meta-data>
- <path-permission>
- <permission>
- <permission-group>
- <permission-tree>
- <provider>
- <receiver>
- <service>
- <supports-gl-texture>
- <supports-screens>
- <uses-configuration>
- <uses-feature>
- <uses-library>
- <uses-permission>
- <uses-sdk>
- requestWindowFeature(Window.FEATURE_LEFT_ICON);
- // requestWindowFeature()必须在setContentView()之前,否则会报错;
- // requestWindowFeature()操控的对象还有:
- // 1.DEFAULT_FEATURES:系统默认状态,一般不需要指定
- // 2.FEATURE_CONTEXT_MENU:启用ContextMenu,默认该项已启用,一般无需指定
- // 3.FEATURE_CUSTOM_TITLE:自定义标题。当需要自定义标题时必须指定。如:标题是一个按钮时
- // 4.FEATURE_INDETERMINATE_PROGRESS:不确定的进度
- // 5.FEATURE_LEFT_ICON:标题栏左侧的图标
- // 6.FEATURE_NO_TITLE:无标题
- // 7.FEATURE_OPTIONS_PANEL:启用“选项面板”功能,默认已启用。
- // 8.FEATURE_PROGRESS:进度指示器功能
- // 9.FEATURE_RIGHT_ICON:标题栏右侧的图标