修改Lanucher屏幕数
来源:互联网 发布:达内 网络培训和 编辑:程序博客网 时间:2024/06/10 08:37
首先,在Launcher.java代码中,第125行
- static final int SCREEN_COUNT = 5;
- static final int DEFAULT_SCREEN = 2;//第一页是从0开始计数,这里是把第三个页面作为默认首页
第一个参数定义屏幕个数,第一个参数是默认的首页。在这里,你可以做出自己的修改。但是,仅这点修改,远远不够,我们看一下launcher.xml
- <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>
我们可以看到 导入了五个workspace_screen,在这里,参照你上面修改的参数,添加或者删除workspace_screen。在这里,你可能也注意到了
- launcher:defaultScreen="2">
在这里定义的defaultScreen。
同时,要修改workspace.java中180
- mDefaultScreen = a.getInt(R.styleable.Workspace_defaultScreen, 1);
和res/xml文件中default_workspace做出相应的修改。这样就基本上可以了。
- 修改Lanucher屏幕数
- 修改lanucher的方法
- android系统加速以及修改lanucher
- launcher修改--修改launcher的屏幕数
- launcher修改--修改launcher的屏幕数
- android lanucher
- debug lanucher
- Android源码之Launcher修改---修改Launcher的主屏幕的屏幕数
- 修改android4.0 Launcher2 桌面的列数/行数/屏幕数
- 修改android4.0 Launcher2 桌面的列数/行数/屏幕数
- 客制化设置Android Lanucher
- android 开机 lanucher
- 1.Android Lanucher 源码下载
- linux修改屏幕刷新率
- experiment : 屏幕取色器修改
- Android修改屏幕亮度
- CentOS虚拟机屏幕修改
- Ubuntu修改屏幕亮度
- 【c/c++】configure.ac/configure.in
- 如何入门软件测试的职位
- 树控件
- 最大匹配字符子串 深度优先
- Jquery Uploadify多文件上传带进度条 且传递自己的参数示例
- 修改Lanucher屏幕数
- printk 使用方法
- 带心上路,一切外物自然具足
- 利用row_number函数处理重复数据
- c# Webservice 生成代理类并在客户端调用
- LA 3029 - City Game
- 你需要的不是重构,而是理清业务逻辑
- 桌面快捷方式布置
- 服务器数据库系列 - Nginx防攻击的三种方法