launcher3桌面阴影和systemUI阴影

  

workspace_bg.9.png资源图片

packages\apps\Launcher3\src\com\android\launcher3\Launcher.java

mWorkspaceBackgroundDrawable = getResources().getDrawable(R.drawable.workspace_bg);

  private void setWorkspaceBackground(boolean workspace) {

        mLauncherView.setBackground(workspace ?
        null : null);  //modified  delete the shawdown
              //  mWorkspaceBackgroundDrawable : null);

    }

设置为 null 即可。这是launcher桌面的设置。

其实在桌面的时候   还是看到上下游阴影,这是SystemUI 的 状态栏和导航栏,如果也想去掉,就把status_background.9.png 和nav_background.9.png 换成你想要的颜色。

你也可以用XML文件替换过,比如, 参考http://www.cnblogs.com/xiaoQLu/archive/2011/09/14/2176359.html

frameworks\base\packages\SystemUI\res\drawable\status_bar_background_launcher.xml

<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <!--gradient 
        android:startColor="#809933cc"
        android:endColor="#80ffffff"
        android:angle="270"
        /-->
        <solid android:color="#00ffffff"/>
</shape>

然后在

frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\PhoneStatusBarTransitions.java

    public PhoneStatusBarTransitions(PhoneStatusBarView view) {
        //super(view, R.drawable.status_background);
        super(view, R.drawable.status_bar_background_launcher); //modified by 
        mView = view;
        final Resources res = mView.getContext().getResources();
        mIconAlphaWhenOpaque = res.getFraction(R.dimen.status_bar_icon_drawing_alpha, 1, 1);
    }

替换即可。


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值