Skip to content

Commit 4119a6c

Browse files
committed
Opt out of Main Activity edge-to-edge
1 parent 665328a commit 4119a6c

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

app/src/main/java/io/github/yawnoc/strokeinput/MainActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class MainActivity
6161
protected void onCreate(final Bundle savedInstanceState)
6262
{
6363
super.onCreate(savedInstanceState);
64+
getTheme().applyStyle(R.style.NoEdgeToEdge, false);
6465
setTitle(R.string.label__main_activity__welcome);
6566
setContentView(R.layout.main_activity);
6667

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<style name="NoEdgeToEdge">
4+
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
5+
</style>
6+
</resources>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3+
<style name="NoEdgeToEdge">
4+
<!-- API 34 or earlier does not need `android:windowOptOutEdgeToEdgeEnforcement` -->
5+
</style>
36
<style name="MainActivityText">
47
<item name="android:layout_height">match_parent</item>
58
<item name="android:layout_width">match_parent</item>

0 commit comments

Comments
 (0)