1.将launcher2的源码从packages/apps/Launcher2/下倒入到eclipse中,具体方法见: http://blog.csdn.net/singleton1900/article/details/8806978
2.待成功能编译出Launcher2后,开始修改代码。
3.找到res/layout/apps_customize_pane.xml文件,将
- <com.android.launcher.AppsCustomizeTabHost
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- android:background="#FF000000">
- <com.android.launcher.AppsCustomizeTabHost
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- android:background="#00000000">
5.编译运行,即可看到应用列表背景变为透明。
diff --git a/packages/apps/Launcher2/res/layout/apps_customize_pane.xml b/packages/apps/Launcher2/res/layout/apps_customize_pane.xml
index 41ba9e2..c83b5da 100644
--- a/packages/apps/Launcher2/res/layout/apps_customize_pane.xml
+++ b/packages/apps/Launcher2/res/layout/apps_customize_pane.xml
@@ -16,7 +16,7 @@
<com.android.launcher2.AppsCustomizeTabHost
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- android:background="#FF000000">
+ android:background="#00000000">
<LinearLayout
android:id="@+id/apps_customize_content"
android:orientation="vertical"
diff --git a/packages/apps/Launcher2/src/com/android/launcher2/Launcher.java b/packages/apps/Launcher2/src/com/android/launcher2/Launcher.jav
index 433b0ba..ccfbc44 100755
--- a/packages/apps/Launcher2/src/com/android/launcher2/Launcher.java
+++ b/packages/apps/Launcher2/src/com/android/launcher2/Launcher.java
@@ -2420,7 +2420,7 @@ public final class Launcher extends Activity
if (isAllAppsVisible()) {
if (mAppsCustomizeTabHost != null &&
!mAppsCustomizeTabHost.isTransitioning()) {
- updateWallpaperVisibility(false);
+ updateWallpaperVisibility(true);
}
}
}
@@ -2599,7 +2599,7 @@ public final class Launcher extends Activity
hideDockDivider();
}
if (!animationCancelled) {
- updateWallpaperVisibility(false);
+ updateWallpaperVisibility(true);
}
// Hide the search bar
@@ -2693,7 +2693,7 @@ public final class Launcher extends Activity
dispatchOnLauncherTransitionPrepare(toView, animated, false);
dispatchOnLauncherTransitionStart(toView, animated, false);
dispatchOnLauncherTransitionEnd(toView, animated, false);
- updateWallpaperVisibility(false);
+ updateWallpaperVisibility(true);
}
}