Android Launcher View构架浅析
来源:互联网 发布:linux创建用户指定id 编辑:程序博客网 时间:2024/05/22 12:00
http://www.linuxidc.com/Linux/2011-02/32399.htm1. 先来看一下launcher activity view的架构图(hierarchyviewer.bat工具获取):
2. 再来看layout/launcher.xml, layout-port/launcher.xml, layout-land/launcher.xml
<com.Android.Launcher.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="fill_parent"
Android:layout_height="fill_parent"
Android:background="#FFF">
<!-- The workspace contains 3 screens of cells -->
<com.Android.Launcher.Workspace
Android:id="@+id/workspace"
Android:layout_width="fill_parent"
Android:layout_height="fill_parent"
launcher:defaultScreen="1">
<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" />
</com.Android.Launcher.Workspace>
<SlidingDrawer
Android:id="@+id/drawer"
Android:layout_width="fill_parent"
Android:layout_height="fill_parent"
Android:orientation="horizontal"
Android:bottomOffset="4dip"
Android:handle="@+id/all_apps"
Android:content="@+id/content">
<com.Android.Launcher.HandleView
Android:id="@id/all_apps"
Android:layout_width="56dip"
Android:layout_height="56dip"
Android:background="@drawable/handle"
Android:focusable="true"
Android:clickable="true"
Android:scaleType="center"
Android:src="../../@drawable/handle_icon"
launcher:direction="vertical" />
<com.Android.Launcher.AllAppsGridView
Android:id="@id/content"
Android:layout_width="fill_parent"
Android:layout_height="fill_parent"
launcher:texture="@drawable/pattern_carbon_fiber_dark"
Android:scrollbarStyle="outsideInset"
Android:drawSelectorOnTop="false"
Android:listSelector="@drawable/grid_selector"
Android:nextFocusLeft="@id/all_apps"
Android:nextFocusDown="@id/content"
Android:nextFocusUp="@id/content"
Android:nextFocusRight="@id/content"
Android:verticalSpacing="10dip"
Android:numColumns="5" />
</SlidingDrawer>
<com.Android.Launcher.DeleteZone
Android:id="@+id/delete_zone"
Android:layout_width="49dip"
Android:layout_height="wrap_content"
Android:scaleType="center"
Android:src="../../@drawable/ic_delete"
Android:background="@drawable/delete_zone_selector"
Android:layout_marginBottom="-25dip"
Android:layout_gravity="right|center_vertical"
Android:visibility="gone"
launcher:direction="vertical" />
</com.Android.Launcher.DragLayer>
3. 呈现界面:()
其中Workspace可增加到任意多个cell,如7个:
launcher:defaultScreen="3">
<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" />
<include Android:id="@+id/cell6" layout="@layout/workspace_screen" />
<include Android:id="@+id/cell7" layout="@layout/workspace_screen" />
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2011-02/32399.htm
- Android Launcher View构架浅析
- Android Launcher View构架浅析
- Android Launcher View构架浅析(转)
- Android Launcher浅析(一)
- Android Launcher浅析(二)
- Android Launcher浅析(三)
- android浅析1---android系统构架
- android自定义View浅析
- android view 浅析
- 浅析Android自定义view
- Launcher源码浅析-----Launcher布局
- Launcher源码浅析-----Launcher布局
- 浅析Android View(一)
- 浅析Android View(二)
- Android的自定义View浅析
- Android-View绘制流程浅析
- python 程序构架浅析
- Qt Model/View 构架
- 两个div块中的文字所占用的高度在不同浏览器中不一致,此时应设置两个div块中height和line-height
- Android UI 优化 使用<include/>和 <merge />标签
- 运用WCF来简化Ajax代码
- 用于检测进程的shell脚本
- source insight 3.5 如何增强阅读代码的性能
- Android Launcher View构架浅析
- EL表达式 (详解)
- Java 类集
- JAVA中iterator与add的顺序问题
- 学习计划于2011年9月10日
- AS3 - Web Service 类包
- Ubuntu 下安裝 GTK
- 输出2-n的所有素数
- 推荐几本。net的图书