Skip to content

Commit b385cdb

Browse files
Copilothossain-khan
andcommitted
Complete edge-to-edge implementation with theme variations for different API levels
Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
1 parent 8344a36 commit b385cdb

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<resources>
2+
<!-- Base application theme for API 29+ (Android 10) with enhanced edge-to-edge support -->
3+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
4+
<!-- Customize your theme here. -->
5+
<item name="colorPrimary">@color/colorPrimary</item>
6+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
7+
<item name="colorAccent">@color/colorAccent</item>
8+
9+
<!-- Enable edge-to-edge display -->
10+
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
11+
<item name="android:statusBarColor">@android:color/transparent</item>
12+
<item name="android:navigationBarColor">@android:color/transparent</item>
13+
<item name="android:windowLightStatusBar">true</item>
14+
<item name="android:windowLightNavigationBar">true</item>
15+
<item name="android:enforceStatusBarContrast">false</item>
16+
<item name="android:enforceNavigationBarContrast">false</item>
17+
</style>
18+
19+
</resources>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<resources>
1+
<resources xmlns:tools="http://schemas.android.com/tools">
22
<!-- Base application theme. -->
33
<style name="AppTheme" parent="Theme.AppCompat.Light.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

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

1313
</resources>

0 commit comments

Comments
 (0)