Skip to content

Commit 70f41a0

Browse files
Merge pull request #98 from bhaskar966/master
2 parents cadbec1 + e7344be commit 70f41a0

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<!-- For Material You Theme -->
5+
<style name="MyApp.Default.MaterialYou" parent="Frames.Default.MaterialYou">
6+
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
7+
</style>
8+
9+
<!-- For Non-Material You Amoled Theme -->
10+
<style name="MyApp.Default.Amoled" parent="Frames.Default.Amoled">
11+
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
12+
</style>
13+
14+
<!-- For Material You Amoled Theme -->
15+
<style name="MyApp.Default.Amoled.MaterialYou" parent="Frames.Default.Amoled.MaterialYou">
16+
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
17+
</style>
18+
19+
<!-- For Non-Material You Theme -->
20+
<style name="MyApp.Default" parent="Frames.Default">
21+
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
22+
</style>
23+
</resources>

buildSrc/src/main/java/Versions.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
object Versions {
44
// Plugins
5-
const val gradle = "8.5.0"
5+
const val gradle = "8.6.0"
66
const val kotlin = "2.0.0"
77
const val sonatype = "2.0.0"
88
const val ksp = "$kotlin-1.0.22"
@@ -12,8 +12,8 @@ object Versions {
1212

1313
// App
1414
const val minSdk = 21
15-
const val targetSdk = 34
16-
const val buildTools = "34.0.0"
15+
const val targetSdk = 35
16+
const val buildTools = "35.0.0"
1717

1818
// Frames
1919
const val frames = "3.6.2"

library/src/main/kotlin/dev/jahir/kuper/data/models/Component.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ data class Component(
101101
var maxX = -1
102102
var maxY = -1
103103

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

107107
for (y in 0 until height) {
@@ -120,8 +120,8 @@ data class Component(
120120
}
121121
}
122122

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

0 commit comments

Comments
 (0)