fixed ignoring manual barcode typing
This commit is contained in:
parent
0fdcabca48
commit
dfe6fa9c3e
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "org.foxarmy.barcodescannerforemployees",
|
||||||
|
"variantName": "release",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 1,
|
||||||
|
"versionName": "1.0",
|
||||||
|
"outputFile": "app-release.apk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"elementType": "File",
|
||||||
|
"baselineProfiles": [
|
||||||
|
{
|
||||||
|
"minApi": 28,
|
||||||
|
"maxApi": 30,
|
||||||
|
"baselineProfiles": [
|
||||||
|
"baselineProfiles/1/app-release.dm"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"minApi": 31,
|
||||||
|
"maxApi": 2147483647,
|
||||||
|
"baselineProfiles": [
|
||||||
|
"baselineProfiles/0/app-release.dm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minSdkVersionForDexing": 24
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ import androidx.annotation.RequiresApi
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.widget.addTextChangedListener
|
||||||
import com.google.mlkit.vision.barcode.common.Barcode
|
import com.google.mlkit.vision.barcode.common.Barcode
|
||||||
import com.google.mlkit.vision.codescanner.GmsBarcodeScannerOptions
|
import com.google.mlkit.vision.codescanner.GmsBarcodeScannerOptions
|
||||||
import com.google.mlkit.vision.codescanner.GmsBarcodeScanning
|
import com.google.mlkit.vision.codescanner.GmsBarcodeScanning
|
||||||
|
@ -76,6 +77,10 @@ class AddAbstractProductActivity : AppCompatActivity() {
|
||||||
fillupCategorySpinner()
|
fillupCategorySpinner()
|
||||||
fillupUnitsSpinner()
|
fillupUnitsSpinner()
|
||||||
|
|
||||||
|
barcodeText.addTextChangedListener {
|
||||||
|
this.barcode = barcodeText.text.toString()
|
||||||
|
}
|
||||||
|
|
||||||
if (abstractProduct?.name == "" && abstractProduct?.barcode != "") {
|
if (abstractProduct?.name == "" && abstractProduct?.barcode != "") {
|
||||||
performRequest(abstractProduct?.barcode!!)
|
performRequest(abstractProduct?.barcode!!)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue