Procházet zdrojové kódy

fix black screen when manual focus

flutter-beta
Leon před 7 roky
committed by GitHub
rodič
revize
d18e2dffae
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 9 přidání a 1 odebrání
  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 Zobrazit soubor

@@ -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()
}


Načítá se…
Zrušit
Uložit