react-native-camera-kit-no-.../android/generated/java/com/facebook/react/viewmanagers/CKCameraManagerDelegate.java
Seph Soliman 9a41d1c8ae Fixed SafeAreaView dummy support on iOS
Fixed zoom issue
Fixed Fabric (new arch) compile issues on both platforms
Fixed included broken codegen lib code
Fixed broken .h import paths to avoid setting custom build settings
Fixed potential memory issue by disabling view recycling
Added Fabric (new arch) support for camera view component
Added RN 0.81 for example
Added RN 0.79 for main lib
Added helper for re-running codegen
Added gitignore for Android codegen making a podspec
Added support for scanThrottleDelay on Android
Added includesGeneratedCode to package.json to indicate changes
Rewrote optional int props to use -1 instead due to RN bug
Moved to Obj-C with C++ support (.mm) to avoid C++ compile issues
2025-09-04 15:38:29 -07:00

98 lines
3.9 KiB
Java

/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GeneratePropsJavaDelegate.js
*/
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ColorPropConverter;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.BaseViewManager;
import com.facebook.react.uimanager.BaseViewManagerDelegate;
import com.facebook.react.uimanager.LayoutShadowNode;
public class CKCameraManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & CKCameraManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
public CKCameraManagerDelegate(U viewManager) {
super(viewManager);
}
@Override
public void setProperty(T view, String propName, @Nullable Object value) {
switch (propName) {
case "flashMode":
mViewManager.setFlashMode(view, value == null ? null : (String) value);
break;
case "focusMode":
mViewManager.setFocusMode(view, value == null ? null : (String) value);
break;
case "maxPhotoQualityPrioritization":
mViewManager.setMaxPhotoQualityPrioritization(view, value == null ? null : (String) value);
break;
case "zoomMode":
mViewManager.setZoomMode(view, value == null ? null : (String) value);
break;
case "zoom":
mViewManager.setZoom(view, value == null ? -1f : ((Double) value).doubleValue());
break;
case "maxZoom":
mViewManager.setMaxZoom(view, value == null ? -1f : ((Double) value).doubleValue());
break;
case "torchMode":
mViewManager.setTorchMode(view, value == null ? null : (String) value);
break;
case "cameraType":
mViewManager.setCameraType(view, value == null ? null : (String) value);
break;
case "scanBarcode":
mViewManager.setScanBarcode(view, value == null ? false : (boolean) value);
break;
case "showFrame":
mViewManager.setShowFrame(view, value == null ? false : (boolean) value);
break;
case "laserColor":
mViewManager.setLaserColor(view, ColorPropConverter.getColor(value, view.getContext()));
break;
case "frameColor":
mViewManager.setFrameColor(view, ColorPropConverter.getColor(value, view.getContext()));
break;
case "ratioOverlay":
mViewManager.setRatioOverlay(view, value == null ? null : (String) value);
break;
case "ratioOverlayColor":
mViewManager.setRatioOverlayColor(view, ColorPropConverter.getColor(value, view.getContext()));
break;
case "resetFocusTimeout":
mViewManager.setResetFocusTimeout(view, value == null ? -1 : ((Double) value).intValue());
break;
case "resetFocusWhenMotionDetected":
mViewManager.setResetFocusWhenMotionDetected(view, value == null ? false : (boolean) value);
break;
case "resizeMode":
mViewManager.setResizeMode(view, value == null ? null : (String) value);
break;
case "scanThrottleDelay":
mViewManager.setScanThrottleDelay(view, value == null ? -1 : ((Double) value).intValue());
break;
case "barcodeFrameSize":
mViewManager.setBarcodeFrameSize(view, (ReadableMap) value);
break;
case "shutterPhotoSound":
mViewManager.setShutterPhotoSound(view, value == null ? false : (boolean) value);
break;
case "shutterAnimationDuration":
mViewManager.setShutterAnimationDuration(view, value == null ? -1 : ((Double) value).intValue());
break;
case "outputPath":
mViewManager.setOutputPath(view, value == null ? null : (String) value);
break;
default:
super.setProperty(view, propName, value);
}
}
}