ソースを参照

fix black screen when manual focus

flutter-beta
Leon 7年前
committed by GitHub
コミット
d18e2dffae
この署名に対応する既知のキーがデータベースに存在しません GPGキー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()
}


読み込み中…
キャンセル
保存