Skip to content

Commit

Permalink
Add support for SDK 35 aka Android 15.
Browse files Browse the repository at this point in the history
-- Due to my limited knowledge about Views or XML layouts, I'm not able to fix the overlapping content with status bar in Android 15.

Rather I have, opted out from the enforcement. For now it is fine but Google will soon make it deprecated, so we need to adapt the layout for Android 15 before it deprecate.

It is because Android 15 by-default enables edge to edge view.
  • Loading branch information
bhaskar966 committed Dec 28, 2024
1 parent efc4bea commit c10b931
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/src/main/kotlin/dev/jahir/kuper/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.github.javiersantos.piracychecker.PiracyChecker
import dev.jahir.kuper.ui.activities.KuperActivity

class MainActivity : KuperActivity() {

/**
* These things here have the default values. You can delete the ones you don't want to change
* and/or modify the ones you want to.
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/res/values-v35/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- For Material You Theme -->
<style name="MyApp.Default.MaterialYou" parent="Frames.Default.MaterialYou">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<!-- For Non-Material You Amoled Theme -->
<style name="MyApp.Default.Amoled" parent="Frames.Default.Amoled">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<!-- For Material You Amoled Theme -->
<style name="MyApp.Default.Amoled.MaterialYou" parent="Frames.Default.Amoled.MaterialYou">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<!-- For Non-Material You Theme -->
<style name="MyApp.Default" parent="Frames.Default">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>
6 changes: 3 additions & 3 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

object Versions {
// Plugins
const val gradle = "8.5.0"
const val gradle = "8.6.0"
const val kotlin = "2.0.0"
const val sonatype = "2.0.0"
const val ksp = "$kotlin-1.0.22"
Expand All @@ -12,8 +12,8 @@ object Versions {

// App
const val minSdk = 21
const val targetSdk = 34
const val buildTools = "34.0.0"
const val targetSdk = 35
const val buildTools = "35.0.0"

// Frames
const val frames = "3.6.2"
Expand Down

0 comments on commit c10b931

Please sign in to comment.