fix: Use ViewGroupManager instead of SimpleViewManager (#735)

This commit is contained in:
NilsKrause 2022-01-13 10:33:07 +01:00 committed by GitHub
parent 314e4c3c8b
commit 202508b500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,12 +3,12 @@ package com.mrousavy.camera
import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReadableMap import com.facebook.react.bridge.ReadableMap
import com.facebook.react.common.MapBuilder import com.facebook.react.common.MapBuilder
import com.facebook.react.uimanager.SimpleViewManager import com.facebook.react.uimanager.ViewGroupManager
import com.facebook.react.uimanager.ThemedReactContext import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.annotations.ReactProp import com.facebook.react.uimanager.annotations.ReactProp
@Suppress("unused") @Suppress("unused")
class CameraViewManager(reactContext: ReactApplicationContext) : SimpleViewManager<CameraView>() { class CameraViewManager(reactContext: ReactApplicationContext) : ViewGroupManager<CameraView>() {
public override fun createViewInstance(context: ThemedReactContext): CameraView { public override fun createViewInstance(context: ThemedReactContext): CameraView {
val cameraViewModule = context.getNativeModule(CameraViewModule::class.java)!! val cameraViewModule = context.getNativeModule(CameraViewModule::class.java)!!