mirror of
https://github.com/simplezhli/flutter_barcode_reader.git
synced 2024-11-17 10:49:19 +08:00
依赖版本修改
This commit is contained in:
parent
39ecc57bc0
commit
99718f6af2
@ -9,7 +9,7 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.41"
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,8 +42,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20'
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
|
||||
implementation 'me.dm7.barcodescanner:zxing:1.9.13'
|
||||
api 'com.google.android.material:material:1.0.0'
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.google.zxing.Result
|
||||
import me.dm7.barcodescanner.zxing.ZXingScannerView
|
||||
|
||||
@ -36,11 +36,11 @@ class BarcodeScannerActivity : Activity(), ZXingScannerView.ResultHandler {
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
if (scannerView.flash) {
|
||||
val item = menu.add(0,
|
||||
TOGGLE_FLASH, 0, "Flash Off")
|
||||
TOGGLE_FLASH, 0, "关闭闪光灯")
|
||||
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS)
|
||||
} else {
|
||||
val item = menu.add(0,
|
||||
TOGGLE_FLASH, 0, "Flash On")
|
||||
TOGGLE_FLASH, 0, "开启闪光灯")
|
||||
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS)
|
||||
}
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
|
@ -17,7 +17,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "27.0.3"
|
||||
buildToolsVersion "28.0.3"
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
|
Loading…
Reference in New Issue
Block a user