Skip to content

Commit

Permalink
Always use dark mode in main activity
Browse files Browse the repository at this point in the history
  • Loading branch information
t895 committed Nov 5, 2024
1 parent c1275a5 commit 6584154
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"
android:screenOrientation="nosensor"
android:exported="true">
android:exported="true"
android:theme="@style/Theme.Camera">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down Expand Up @@ -72,7 +73,8 @@
android:screenOrientation="nosensor"
android:showWhenLocked="true"
android:excludeFromRecents="true"
android:exported="true">
android:exported="true"
android:theme="@style/Theme.Camera">

<intent-filter>
<action android:name="android.media.action.STILL_IMAGE_CAMERA_SECURE"/>
Expand Down
9 changes: 8 additions & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="Theme.Camera" parent="Theme.Material3.Dark.NoActionBar">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>

<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

<style name="Theme.App" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>

Expand All @@ -13,7 +20,7 @@
<item name="cornerSize">50%</item>
</style>

<style name="Theme.App.FullscreenDialog" parent="Theme.App">
<style name="Theme.App.FullscreenDialog" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:windowMinWidthMajor">80%</item>
<item name="android:windowMinWidthMinor">80%</item>
</style>
Expand Down

0 comments on commit 6584154

Please sign in to comment.