Ver a proveniência

fix black screen when manual focus

flutter-beta
Leon há 7 anos
committed by GitHub
ascendente
cometimento
d18e2dffae
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
1 ficheiros alterados com 9 adições e 1 eliminações
  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 Ver ficheiro

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


Carregando…
Cancelar
Guardar