Skip to content

Commit 95ab146

Browse files
committed
opt out of forced dark mode
1 parent 4a07234 commit 95ab146

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ Copyright 2024 The Android Open Source Project
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ https://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
17+
<resources>
18+
<style name="Theme.Nia" parent="NightAdjusted.Theme.Nia">
19+
<item name="android:forceDarkAllowed">false</item>
20+
</style>
21+
</resources>

app/src/main/res/values/themes.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
<style name="NightAdjusted.Theme.Nia" parent="android:Theme.Material.Light.NoActionBar" />
2222

2323
<!-- The final theme we use -->
24-
<style name="Theme.Nia" parent="NightAdjusted.Theme.Nia" />
24+
<style name="Theme.Nia" parent="NightAdjusted.Theme.Nia">
25+
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
26+
</style>
2527

2628
<style name="NightAdjusted.Theme.Splash" parent="Theme.SplashScreen">
2729
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>

0 commit comments

Comments
 (0)