Launcher hotseat上icon显示文字的修改
2013-10-18 14:02
561 查看
Hotseat显示文字
原生launcher对hotseat上的图标做了不显示文字的处理
1. 显示文字修改如下
往hotseat上添加图标(workspace.java的addInscreen()方法中)相关代码做如下修改:
if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
//对处于hotseat上的图标进行缩小处理
child.setScaleX(0.8f);
child.setScaleY(0.8f);
.…..
//如果Icon处于hotseat上则关闭文字的边缘渲染,以减少GPU的负担
//Hotseat Icon Text Label is not visible anyway and drawing theFadingEdge for the
//Text label takes a heavy toll on GPU during hw accelerated rendering
//So disable FadingEdge for text Label if the Icon is in Hotseat
//if (child instanceof TextView) {
TextView hotseatIcon =(TextView)child;
//if(hotseatIcon.isHorizontalFadingEdgeEnabled()){
//hotseatIcon.setHorizontalFadingEdgeEnabled(false);
//}
//}
//如果文件夹处于hotseat上则不显示文字
// Hide folder title in the hotseat
//if (child instanceof FolderIcon) {
//((FolderIcon)child).setTextVisible(false);
//}
……
} else {
//还原
child.setScaleX(1);
child.setScaleY(1);
……..
}
2.在CellLayout的addViewToCellLayout()方法中修改如下
//如果icon处于hotseat上则将字体颜色设为透明
// Hotseat icons - remove text
……
//if(mIsHotseat) {
// bubbleChild.setTextColor(res.getColor(android.R.color.transparent));
//} else {
// bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
//}
bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
}
3. 调整hotseat上的单元格高度,使得有空间来显示文字
//调整hotseat高度
<dimenname="button_bar_height_plus_padding">78dp</dimen>
//调整单元格高度
<dimenname="hotseat_cell_height">78dp</dimen>
原生launcher对hotseat上的图标做了不显示文字的处理
1. 显示文字修改如下
往hotseat上添加图标(workspace.java的addInscreen()方法中)相关代码做如下修改:
if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
//对处于hotseat上的图标进行缩小处理
child.setScaleX(0.8f);
child.setScaleY(0.8f);
.…..
//如果Icon处于hotseat上则关闭文字的边缘渲染,以减少GPU的负担
//Hotseat Icon Text Label is not visible anyway and drawing theFadingEdge for the
//Text label takes a heavy toll on GPU during hw accelerated rendering
//So disable FadingEdge for text Label if the Icon is in Hotseat
//if (child instanceof TextView) {
TextView hotseatIcon =(TextView)child;
//if(hotseatIcon.isHorizontalFadingEdgeEnabled()){
//hotseatIcon.setHorizontalFadingEdgeEnabled(false);
//}
//}
//如果文件夹处于hotseat上则不显示文字
// Hide folder title in the hotseat
//if (child instanceof FolderIcon) {
//((FolderIcon)child).setTextVisible(false);
//}
……
} else {
//还原
child.setScaleX(1);
child.setScaleY(1);
……..
}
2.在CellLayout的addViewToCellLayout()方法中修改如下
//如果icon处于hotseat上则将字体颜色设为透明
// Hotseat icons - remove text
……
//if(mIsHotseat) {
// bubbleChild.setTextColor(res.getColor(android.R.color.transparent));
//} else {
// bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
//}
bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
}
3. 调整hotseat上的单元格高度,使得有空间来显示文字
//调整hotseat高度
<dimenname="button_bar_height_plus_padding">78dp</dimen>
//调整单元格高度
<dimenname="hotseat_cell_height">78dp</dimen>
相关文章推荐
- Java FckEditor 2.6+JSP的配置方法详解
- centOS下配置php开发环境的一些常用路径
- 第十周项目2(从简单起)-计算1+1/2+1/3+...+1/20的和
- iOS培训篇——BOOL强大的实用功能介绍
- Android语音识别技术、消息推送机制、二维码扫描技术、NDK、JNI
- Android Layout.xml布局属性
- 【Java工程师之路】[2-1.6]ORACLE函数大全
- MySQL 5.7 的多源复制
- 在js中将number类型的数据转换成保留两位小数的字符串
- Knockout.Js官网学习(selectedOptions绑定、uniqueName 绑定)
- (2)Android开源项目介绍
- MFC ListControl 点击列头排序
- Android 使用ContentProvider 实现多个activity灵活显示,实现Intent隐式传值.
- 设置对话框窗口的“默认按钮”方法
- android SystemUI 流程分析
- 重写equals方法和hashcode方法的作用
- 110502 Reverse and Add
- socket通信协议关系详解
- JQUERY的父,子,兄弟节点查找方法
- hive 面试题