mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
feat!: add partial night & day theme support (#1818)
* feat!: partial night & day theme support * feat!: prefix core resource values files with cdv_
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resources>
|
||||
<color name="cdv_background_color">@android:color/system_background_dark</color>
|
||||
<color name="cdv_splashscreen_background">@color/cdv_background_color</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resources>
|
||||
<color name="cdv_background_color">#121318</color>
|
||||
<color name="cdv_splashscreen_background">@color/cdv_background_color</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resources>
|
||||
<color name="cdv_background_color">@android:color/system_background_light</color>
|
||||
<color name="cdv_splashscreen_background">@color/cdv_background_color</color>
|
||||
</resources>
|
||||
+2
-1
@@ -18,5 +18,6 @@
|
||||
under the License.
|
||||
-->
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<color name="cdv_splashscreen_background">#FFFFFFFF</color>
|
||||
<color name="cdv_background_color">#FAF8FF</color>
|
||||
<color name="cdv_splashscreen_background">@color/cdv_background_color</color>
|
||||
</resources>
|
||||
+14
-10
@@ -19,19 +19,23 @@
|
||||
-->
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen.IconBackground">
|
||||
<!-- Optional: Set the splash screen background. (Default: #FFFFFF) -->
|
||||
<item name="windowSplashScreenBackground">@color/cdv_splashscreen_background</item>
|
||||
<!-- Optional: Set the splash screen background. (Default: @color/cdv_splashscreen_background) -->
|
||||
<item name="windowSplashScreenBackground">@color/cdv_splashscreen_background</item>
|
||||
|
||||
<!-- Required: Add either a drawable or an animated drawable -->
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_cdv_splashscreen</item>
|
||||
<!-- Required: Add either a drawable or an animated drawable -->
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_cdv_splashscreen</item>
|
||||
|
||||
<!-- Required: For animated icons -->
|
||||
<item name="windowSplashScreenAnimationDuration">200</item>
|
||||
<!-- Required: For animated icons -->
|
||||
<item name="windowSplashScreenAnimationDuration">200</item>
|
||||
|
||||
<!-- Required: Set the theme of the Activity that directly follows your splash screen. -->
|
||||
<item name="postSplashScreenTheme">@style/Theme.AppCompat.NoActionBar</item>
|
||||
<!-- Required: Set the theme of the Activity that directly follows your splash screen. -->
|
||||
<item name="postSplashScreenTheme">@style/Theme.Cordova.App.DayNight</item>
|
||||
|
||||
<!-- Disable Edge-to-Edge for SDK 35 -->
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
<!-- Disable Edge-to-Edge for SDK 35 -->
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Cordova.App.DayNight" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="android:colorBackground">@color/cdv_background_color</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -49,7 +49,6 @@
|
||||
|
||||
<preference name="loglevel" value="DEBUG" />
|
||||
<!--
|
||||
<preference name="backgroundColor" value="0xFFF" />
|
||||
<preference name="loadUrlTimeoutValue" value="20000" />
|
||||
<preference name="InAppBrowserStorageEnabled" value="true" />
|
||||
<preference name="disallowOverscroll" value="true" />
|
||||
|
||||
Reference in New Issue
Block a user