manifest分析
来源:互联网 发布:大数据的采集是啥 编辑:程序博客网 时间:2024/05/16 05:07
今天开始launcher2分析系列,Launcher2的代码路径为:$ANDROID_SRC/packages/apps/Launcher2
<?xmlversion="1.0"encoding="utf-8"?>
<!--
/*
**
** Copyright 2008, The Android Open Source Project
**
** Licensed under the Apache License,Version 2.0(the "License");
** you may not use this file except in compliance with the License.
** You may obtain acopy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an"AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.launcher"
android:sharedUserId="@string/sharedUserId"
>
<!--package配置我们应用程序的包名 -->
<original-package android:name="com.android.launcher2"/>
<!--对系统资源访问的权限控制 -->
<permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"
android:label="@string/permlab_install_shortcut"
android:description="@string/permdesc_install_shortcut"/>
<permission
android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"
android:label="@string/permlab_uninstall_shortcut"
android:description="@string/permdesc_uninstall_shortcut"/>
<permission
android:name="com.android.launcher.permission.READ_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"
android:label="@string/permlab_read_settings"
android:description="@string/permdesc_read_settings"/>
<permission
android:name="com.android.launcher.permission.WRITE_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"
android:label="@string/permlab_write_settings"
android:description="@string/permdesc_write_settings"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.BIND_APPWIDGET"/>
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS"/>
<!--对我们应用程序的配置 -->
<application
android:name="com.android.launcher2.LauncherApplication"
android:process="@string/process"
android:label="@string/application_name"
android:icon="@drawable/ic_launcher_home">
<!--配置应用程序额的名字,进程,标签,和图标
label的值为values/strings.xml中application_name 键值对的值
icon为drawable目录下名为的ic_launcher_home的图片
实际上该图片的位置位于drawable-hdpi(高分辨率)目录下,是个小房子
-->
<activity
android:name="com.android.launcher2.Launcher"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:theme="@style/Theme"
android:screenOrientation="nosensor"
android:windowSoftInputMode="stateUnspecified|adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.MONKEY"/>
</intent-filter>
</activity>
<!--一个项目可能有很多activity,设置intent-filter可以先启动该activity -->
<activity
android:name="com.android.launcher2.WallpaperChooser"
android:label="@string/pick_wallpaper"
android:icon="@drawable/ic_launcher_wallpaper"
android:screenOrientation="nosensor"
android:finishOnCloseSystemDialogs="true">
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!--设置wallpapaer的activity -->
<!-- Intent received used to install shortcuts from other applications -->
<receiver
android:name="com.android.launcher2.InstallShortcutReceiver"
android:permission="com.android.launcher.permission.INSTALL_SHORTCUT">
<intent-filter>
<action android:name="com.android.launcher.action.INSTALL_SHORTCUT"/>
</intent-filter>
</receiver>
<!--安装快捷方式的intent -->
<!-- Intent received used to uninstall shortcuts from other applications -->
<receiver
android:name="com.android.launcher2.UninstallShortcutReceiver"
android:permission="com.android.launcher.permission.UNINSTALL_SHORTCUT">
<intent-filter>
<action android:name="com.android.launcher.action.UNINSTALL_SHORTCUT"/>
</intent-filter>
</receiver>
<!--设置删除快捷方式的intent -->
<!-- The settings provider contains Home -->
<?xmlversion="1.0"encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.launcher2.DragLayer
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/all_apps"/>
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher2.Workspace
android:id="@+id/workspace"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="horizontal"
android:fadeScrollbars="true"
launcher:defaultScreen="2">
<!-- 上面这行可以确定屏幕横放时默认的桌面号 -->
<include android:id="@+id/cell1" layout="@layout/workspace_screen"/>
<include android:id="@+id/cell2" layout="@layout/workspace_screen"/>
<include android:id="@+id/cell3" layout="@layout/workspace_screen"/>
<include android:id="@+id/cell4" layout="@layout/workspace_screen"/>
<include android:id="@+id/cell5" layout="@layout/workspace_screen"/>
</com.android.launcher2.Workspace>
<!-- 上面这几行描述了几个工作区的屏幕,描述代码为layout-land/workspace_screen
而模拟器上能看到左右各两个小白点可以控制工作区的移动
-->
<!-- 应该对应的是ClippedImageView类-->
<com.android.launcher2.ClippedImageView
android:id="@+id/previous_screen"
android:layout_width="93dip"
android:layout_height="@dimen/button_bar_height"
android:layout_gravity="bottom|left"
android:layout_marginLeft="6dip"
android:scaleType="center"
android:src="@drawable/home_arrows_left"
android:onClick="previousScreen"
launcher:ignoreZone="56dip"
android:focusable="true"
android:clickable="true"/>
<!-- 定义了previousScreen 按钮,即左下脚的白色小点,用来控制移动-->
<com.android.launcher2.ClippedImageView
android:id="@+id/next_screen"
android:layout_width="93dip"
android:layout_height="@dimen/button_bar_height"
android:layout_gravity="bottom|right"
android:layout_marginRight="6dip"
android:scaleType="center"
android:src="@drawable/home_arrows_right"
android:onClick="nextScreen"
launcher:ignoreZone="-56dip"
android:focusable="true"
android:clickable="true"/>
<!-- 底部右边的两个白色小点 -->
<com.android.launcher2.DeleteZone
android:id="@+id/delete_zone"
android:layout_width="@dimen/delete_zone_size"
android:layout_height="@dimen/delete_zone_size"
android:paddingLeft="@dimen/delete_zone_padding"
android:layout_marginBottom="@dimen/half_status_bar_height"
android:layout_gravity="right|center_vertical"
android:scaleType="center"
android:src="@drawable/delete_zone_selector"
android:visibility="invisible"
launcher:direction="vertical"
/>
<!-- 定义Trash放置的位置 右侧,中间平放-->
<RelativeLayout
android:id="@+id/all_apps_button_cluster"
android:layout_height="fill_parent"
android:layout_width="@dimen/button_bar_height_portrait"
android:layout_gravity="right|center_vertical"
android:layout_marginBottom="@dimen/half_status_bar_height"
>
<!-- 定义右侧 靠近屏幕边缘的三个按钮,中间一个是all-apps
之下是phone按钮,之上是浏览器按钮,绑定响应函数
-->
<com.android.launcher2.HandleView
style="@style/HotseatButton"
android:id="@+id/all_apps_button"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/all_apps_button"
launcher:direction="vertical"
/>
<ImageView
android:id="@+id/hotseat_left"
style="@style/HotseatButton.Left"
android:layout_below="@id/all_apps_button"
android:src="@drawable/hotseat_phone"
android:onClick="launchHotSeat"
/>
<!-- onClick的值为响应方法-->
<ImageView
android:id="@+id/hotseat_right"
style="@style/HotseatButton.Right"
android:layout_above="@id/all_apps_button"
android:src="@drawable/hotseat_browser"
android:onClick="launchHotSeat"
/>
<!-- 对浏览器进行的描述-->
</RelativeLayout>
</com.android.launcher2.DragLayer>
- manifest分析
- manifest 文件分析
- 音乐播放器-manifest分析
- manifest
- Manifest
- *.manifest
- <manifest>
- Manifest
- Manifest
- 深入分析JAD和MANIFEST.MF文件
- Android2.2源码分析1.Manifest.permission
- android manifest receiver 属性分析篇
- webpack打包原理和manifest文件分析
- Manifest与exe.config文件原理与结构的分析
- android APK签名过程之MANIFEST.MF分析
- Firefox OS 学习——manifest.webapp结构分析
- android APK签名过程之MANIFEST.MF分析
- android APK签名过程之MANIFEST.MF分析
- 项目总结
- 位运算相关
- 十年经验教你如何学习嵌入式系统(基于ARM平台) (ZT) (转)
- 漫谈经典排序算法:一、从简单选择排序到堆排序的深度解析
- 为什么在Uboot中要关闭watchdog
- manifest分析
- asp.net 常用js
- 我俩的典型的讨论-钱
- launcher 图标删除分析
- Linux_备忘
- CentOS/Redhat:手动配置IP地址
- Android面试题(面经笔试题)收集
- 树状数组
- 备忘:O_RDONLY | O_WRONLY 和 O_RDWR