Преглед на файлове

fix black screen after change screen orientation

but need to fix preview stretching after change screen orientation
flutter-beta
Leon преди 7 години
committed by GitHub
родител
ревизия
66e811b04e
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  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 Целия файл

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


Зареждане…
Отказ
Запис