android Launcher主菜单的每一屏修改为x*x的布局
来源:互联网 发布:mac酷狗播放本地音乐 编辑:程序博客网 时间:2024/06/06 07:17
修改Launcher2/res/value/Dimens.xml 中apps_customize_cell_width 和apps_customize_cell_height的大小。多大的值合适,需要结合代码。
PagedViewCellLayout 中estimateCellHSpan和estimateCellVSpan获取返回值n(n就是每屏单元格数目的列和行)。
以estimateCellVSpan为例,int n = Math.max(1,(availHeight + mHeightGap)/(mCellHeight + mHeightGap));
availHeight 是可用高度,availHeight = estimateCellVSpan's height - topPadding - bottomPadding,而estimateCellVSpan's height = screen‘s heightheight - statusbar's height - navigationBar's height - topPadding - bottomPadding,具体与项目有关;
mHeightGap 通常是-1,不过还是要结合代码逻辑确认;
mCellHeight就是 apps_customize_cell_width乘以系统dimens 后的值
所以就是通过其他已知数据,计算出mCellHeight的值,然后用mCellHeight除以系统dimens得到的结果,就是在xml中apps_customize_cell_width的值。
estimateCellVSpan 类似
PagedViewCellLayout 中estimateCellHSpan和estimateCellVSpan获取返回值n(n就是每屏单元格数目的列和行)。
以estimateCellVSpan为例,int n = Math.max(1,(availHeight + mHeightGap)/(mCellHeight + mHeightGap));
availHeight 是可用高度,availHeight = estimateCellVSpan's height - topPadding - bottomPadding,而estimateCellVSpan's height = screen‘s heightheight - statusbar's height - navigationBar's height - topPadding - bottomPadding,具体与项目有关;
mHeightGap 通常是-1,不过还是要结合代码逻辑确认;
mCellHeight就是 apps_customize_cell_width乘以系统dimens 后的值
所以就是通过其他已知数据,计算出mCellHeight的值,然后用mCellHeight除以系统dimens得到的结果,就是在xml中apps_customize_cell_width的值。
estimateCellVSpan 类似
1 0
- android Launcher主菜单的每一屏修改为x*x的布局
- Android 如何把Launcher桌面的每一屏修改为x*x(例如5*5)的布局?
- android 如何定制Google launcher的主菜单图标
- android如何定制Google launcher的主菜单图标
- 如何客制化Launcher的主菜单图标?
- android Launcher3中主菜单的布局调整(如从5*4调整为4*4)
- android 如何让主菜单的背景显示为壁纸
- android 5.0 让主菜单的背景显示为壁纸
- 如何定制Launcher主菜单中应用程序的显示顺序
- Android 程序主菜单 布局
- DZ X页头主菜单背景图片透明自由更换页头背景图片的方法
- 源码修改之修改Launcher隐藏主菜单图标
- AndroidL中修改launcher3主菜单布局
- 如何将VS2003 C#的主菜单转换为VS2005 C#的主菜单
- android 如何定制Launcher主菜单中应用程序图标在主菜单中的显示顺序
- android 如何定制Launcher主菜单中应用程序图标在主菜单中的显示顺序
- Cocos2d-X游戏【泰然网《跑酷》】JS到C++移植3:游戏主菜单界面的实现
- [VC MFC] 修改主菜单和子菜单的文本
- 模拟地与数字地详解
- VS2010
- Text Justification
- Jsp遍历后台传过来的List
- 内存地址空间布局
- android Launcher主菜单的每一屏修改为x*x的布局
- 剑指offer系列源码--二维数组中的查找
- 应用程序权限设计
- android权限大全
- 关于SQL2005安装完毕后,没有SQL Server Management Studio问题的解决方法
- Android中的JSON的使用
- Unrecognized Windows Sockets error: 0: JVM_Bind 异常解决办法
- jsp网站访问量计数器
- openfire性能优化