Преглед изворни кода

fix black screen when manual focus

flutter-beta
Leon пре 7 година
committed by GitHub
родитељ
комит
d18e2dffae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 9 додато и 1 уклоњено
  1. +9
    -1
      android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt

+ 9
- 1
android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt Прегледај датотеку

@@ -42,6 +42,15 @@ class QRView(context: Context, private val registrar: PluginRegistry.Registrar,
override fun possibleResultPoints(resultPoints: List<ResultPoint>) {}
}
)
barcodeView.addOnAttachStateChangeListener(object : View.OnAttachStateChangeListener {
override fun onViewDetachedFromWindow(p0: View?) {
barcodeView.pause()
}

override fun onViewAttachedToWindow(p0: View?) {
barcodeView.resume()
}
})
}


@@ -54,7 +63,6 @@ class QRView(context: Context, private val registrar: PluginRegistry.Registrar,
}

override fun getView(): View {
barcodeView.pause()
return barcodeView.apply {
init()
}


Loading…
Откажи
Сачувај