Kaynağa Gözat

提交人:jtm
提交内容:主题设置规则

江天明 1 yıl önce
ebeveyn
işleme
da3f3a680c

+ 1 - 1
BusinessCommon/src/main/res/values/themes.xml

@@ -18,7 +18,7 @@
 
     <style name="SplashTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
         <!-- 这里的trans自己写一个#00000000即可-->
-        <item name="android:windowBackground">@drawable/splash_logo_010</item>
+        <item name="android:windowBackground">@drawable/splash_logo</item>
         <item name="windowNoTitle">true</item>
         <item name="windowActionBar">false</item>
         <item name="android:windowFullscreen">true</item>

+ 1 - 1
app/src/main/AndroidManifest.xml

@@ -49,7 +49,7 @@
             android:screenOrientation="landscape"
             android:name=".MainActivity"
             android:exported="true"
-            android:theme="@style/SplashTheme">
+            android:theme="@style/SplashNightTheme">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.HOME" />

+ 2 - 1
app/src/main/java/com/develop/foodcooking/FoodCookingApp.kt

@@ -69,6 +69,7 @@ class FoodCookingApp : BaseApp() {
         )
         WindowManager.getInstance().init(this, OptionFactory())
         val isNight = !isNightTheme()
+        //切换主题,theme=0 night= false 是0000的主题,而且需要AndroidManifest.xml主题设置为  android:theme="@style/SplashTheme"
         ThemeSkinService.getInstance().switchThemeSkin(1)
         setNightTheme(true)
         SerialPortUtils.init()
@@ -90,7 +91,7 @@ class FoodCookingApp : BaseApp() {
             (1000 * 60 * minute).toInt()
         )
 
-        Settings.Secure.putInt(contentResolver,Settings.Secure.INSTALL_NON_MARKET_APPS,1)
+        Settings.Secure.putInt(contentResolver, Settings.Secure.INSTALL_NON_MARKET_APPS, 1)
 
         val uri: Uri = Settings.System
             .getUriFor(Settings.System.SCREEN_OFF_TIMEOUT)