Android4.0.3 Launcher应用程序图标放置区域修改

最开始不知道中间那块区域叫什么,只知道Lancher中间那块操作的地方叫做workspace 上网查了后 发现滑动的时候是CellLayout在进行切换,android4.0默认的CellLayout的区域如图:

基本上已经把整个workspace全占了,同时有的应用程序安装运行后会自动生成桌面快捷方式,而且是生成在桌面左上角,如果不对CellLayout进行修改,生成的桌面快捷方式很可能只有一半会显示出来,所以我就需要对CellLayout的属性进行修改,找了好久终于找到的修改的地方,修改后的效果如图:

这样看起来是不是美观多了。

具体修改如下:

packages/apps/Launcher2/res/layout-sw600dp/workspace.xml内容如下:

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<!-- The workspace contains 5 screens of cells -->

<com.android.launcher2.Workspace
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
    android:paddingTop="@dimen/workspace_content_large_only_top_margin"
    launcher:defaultScreen="2"
    launcher:cellCountX="7"
    launcher:cellCountY="5"
    launcher:pageSpacing="@dimen/workspace_page_spacing">
      <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>
增加了以下两句
    launcher:cellCountX="7"
    launcher:cellCountY="5"
即限定了x,y轴所存放的应用程序图标的个数

默认情况下是在这个目录,有的产家会根据自己的情况进行设置,那个时候就去device目录下去找了


============================================
作者:hclydao
http://blog.csdn.net/hclydao
版权没有,但是转载请保留此段声明

============================================


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值