Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Android 15 #98

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ data class Component(
var maxX = -1
var maxY = -1

val newBitmap = Bitmap.createBitmap(width, height, bitmap.config)
val newBitmap = bitmap.config?.let { Bitmap.createBitmap(width, height, it) }
var pixel: Int

for (y in 0 until height) {
Expand All @@ -120,8 +120,8 @@ data class Component(
}
}

newBitmap.setPixels(pixels, 0, width, 0, 0, width, height)
return Bitmap.createBitmap(newBitmap, minX, minY, maxX - minX + 1, maxY - minY + 1)
newBitmap?.setPixels(pixels, 0, width, 0, 0, width, height)
return newBitmap?.let { Bitmap.createBitmap(it, minX, minY, maxX - minX + 1, maxY - minY + 1) } ?: bitmap
}
}
}