Skip to content

Commit f87c556

Browse files
committed
[FIXED] Dark mode and full screen app theme
1 parent cfc0cf0 commit f87c556

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

example/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ dependencies {
5353
implementation 'androidx.appcompat:appcompat:1.7.0'
5454
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
5555

56+
// Material Components for Android
57+
implementation 'com.google.android.material:material:1.12.0'
58+
5659
// https://developer.android.com/jetpack/androidx/releases/cardview
5760
implementation "androidx.cardview:cardview:1.0.0"
5861

example/src/main/res/values-v23/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<resources>
22
<!-- Base application theme for API 23+ -->
3-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
3+
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
44
<!-- Customize your theme here. -->
55
<item name="colorPrimary">@color/colorPrimary</item>
66
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>

example/src/main/res/values-v29/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<resources>
22
<!-- Base application theme for API 29+ (Android 10) with enhanced edge-to-edge support -->
3-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
3+
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
44
<!-- Customize your theme here. -->
55
<item name="colorPrimary">@color/colorPrimary</item>
66
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
22
<!-- Base application theme. -->
3-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
3+
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
44
<!-- Customize your theme here. -->
55
<item name="colorPrimary">@color/colorPrimary</item>
66
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
77
<item name="colorAccent">@color/colorAccent</item>
88

99
<!-- Enable edge-to-edge display for supported devices -->
10-
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="p">shortEdges</item>
10+
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
1111
</style>
1212

1313
</resources>

0 commit comments

Comments
 (0)