Parcourir la source

修改游戏页面背景

zhipeng il y a 7 mois
Parent
commit
662a9d60f4

+ 1 - 1
native/engine/android/app/AndroidManifest.xml

@@ -29,7 +29,7 @@
             android:label="@string/app_name"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
-            android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
+            android:theme="@style/Theme.Game.Page">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />

+ 11 - 0
native/engine/android/app/src/main/res/values/themes.xml

@@ -7,5 +7,16 @@
         <item name="android:windowFullscreen">true</item>
         <item name="android:windowTranslucentStatus">true</item>
         <item name="android:windowBackground">@drawable/theme_splash</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <style name="Theme.Game.Page" parent="@android:style/Theme.NoTitleBar.Fullscreen">
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor">@android:color/transparent</item>
+        <!-- Customize your theme here. -->
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowTranslucentStatus">true</item>
+        <item name="android:windowBackground">@drawable/theme_splash</item>
+        <item name="android:windowContentOverlay">@null</item>
     </style>
 </resources>