diff --git a/app/build.gradle b/app/build.gradle index ba61248..ba50230 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,12 +6,12 @@ plugins { } android { - compileSdk 33 + compileSdk 34 defaultConfig { applicationId "cz.skaut.srs.ticketsreader" minSdk 26 - targetSdk 33 + targetSdk 34 versionCode 4 versionName "1.1" @@ -42,22 +42,22 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.core:core-ktx:1.12.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation "androidx.preference:preference-ktx:1.2.0" + implementation "androidx.preference:preference-ktx:1.2.1" implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0' implementation 'org.jetbrains.kotlinx:kotlinx-datetime:0.4.1' // Barcode scanning API - implementation 'com.google.mlkit:barcode-scanning:17.1.0' + implementation 'com.google.mlkit:barcode-scanning:17.2.0' // CameraX library - def camerax_version = "1.2.3" + def camerax_version = "1.3.0-rc02" implementation "androidx.camera:camera-camera2:$camerax_version" implementation "androidx.camera:camera-lifecycle:$camerax_version" - implementation "androidx.camera:camera-view:1.3.0-beta01" + implementation "androidx.camera:camera-view:$camerax_version" def ktor_version = "2.3.4" implementation "io.ktor:ktor-client-core:$ktor_version" diff --git a/app/src/main/java/cz/skaut/srs/ticketsreader/scanner/QrBoxView.kt b/app/src/main/java/cz/skaut/srs/ticketsreader/scanner/QrBoxView.kt index ec88f56..fe8466a 100644 --- a/app/src/main/java/cz/skaut/srs/ticketsreader/scanner/QrBoxView.kt +++ b/app/src/main/java/cz/skaut/srs/ticketsreader/scanner/QrBoxView.kt @@ -17,14 +17,14 @@ class QrBoxView(context: Context) : View(context) { private val paint = Paint() private var rectangle = Rect() - override fun onDraw(canvas: Canvas?) { + override fun onDraw(canvas: Canvas) { super.onDraw(canvas) paint.style = Paint.Style.STROKE paint.color = Color.RED paint.strokeWidth = STROKE_WIDTH - canvas?.drawRoundRect(rectangle.toRectF(), CORNER_RADIUS, CORNER_RADIUS, paint) + canvas.drawRoundRect(rectangle.toRectF(), CORNER_RADIUS, CORNER_RADIUS, paint) } fun setRect(rect: Rect) {