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);
}
替换即可。