Explorar el Código

fix black screen after change screen orientation

but need to fix preview stretching after change screen orientation
flutter-beta
Leon hace 7 años
committed by GitHub
padre
commit
66e811b04e
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. +4
    -3
      android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt

+ 4
- 3
android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt Ver fichero

@@ -43,8 +43,6 @@ class QRView(context: Context, private val registrar: PluginRegistry.Registrar,
}
)

init()

activity.application.registerActivityLifecycleCallbacks(
object : Application.ActivityLifecycleCallbacks{
override fun onActivityPaused(p0: Activity?) {
@@ -84,7 +82,10 @@ class QRView(context: Context, private val registrar: PluginRegistry.Registrar,
}

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

override fun dispose() {


Cargando…
Cancelar
Guardar