Android 5.1ステータスバー背景色カスタマイズLauncher 3画面表示透明、その他画面表示黒

4706 ワード

ダイレクトコード
diff --git a/alps/frameworks/base/core/java/android/app/Activity.java b/alps/frameworks/base/core/java/android/app/Activity.java
old mode 100644
new mode 100755
index 1d17928..5650cb7
--- a/alps/frameworks/base/core/java/android/app/Activity.java
+++ b/alps/frameworks/base/core/java/android/app/Activity.java
@@ -1231,6 +1231,20 @@ public class Activity extends ContextThemeWrapper
         getApplication().dispatchActivityResumed(this);
         mActivityTransitionState.onResume();
         mCalled = true;
+		//add by xxxxxx start
+		try{
+              if(getPackageName().equals("com.android.launcher3") ){
+                   Intent showTitleBackIntent = new Intent("change_statusbar_transparent");
+                   sendBroadcast(showTitleBackIntent);
+              }else{
+                  Intent showTitleBackIntent = new Intent("change_statusbar_black");
+                  sendBroadcast(showTitleBackIntent);
+              }
+          }catch (Exception e) {
+             e.printStackTrace();       
+        }
+		//add by xxxxxx end
     }
 
     /**
diff --git a/alps/packages/apps/LauncherL1/src/com/android/launcher3/Launcher.java b/alps/packages/apps/LauncherL1/src/com/android/launcher3/Launcher.java
index c842fec..e848f9f 100755
--- a/alps/packages/apps/LauncherL1/src/com/android/launcher3/Launcher.java
+++ b/alps/packages/apps/LauncherL1/src/com/android/launcher3/Launcher.java
@@ -2066,6 +2066,10 @@ public class Launcher extends Activity
                 if (isInEditMode()) {
                     exitEditMode();
                 }
+				//add by xxxxxx start
+		        Intent in =new Intent("change_statusbar_transparent");
+		        sendBroadcast(in);
+               //add by xxxxxx end
             } else if (Intent.ACTION_USER_PRESENT.equals(action)) {
                 mUserPresent = true;
                 updateRunning();
				 
diff --git a/alps/frameworks/base/packages/SystemUI/res/layout/status_bar.xml b/alps/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
index 6ae2ace..634f821 100755
--- a/alps/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
+++ b/alps/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
@@ -23,12 +23,14 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     android:id="@+id/status_bar"
-    android:background="@drawable/system_bar_background"
+    android:background="#00000000"
     android:orientation="vertical"
     android:focusable="true"
     android:descendantFocusability="afterDescendants"
     >
 	
+
+