Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
Knightwood committed Jun 26, 2024
1 parent 0fa4bea commit 1fc873a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/相机配置.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CameraExampleActivity : BaseCameraXActivity() {
this.recordConfig = videoRecordConfig
//这里指定了打开相机时的默认用例模式,图像分析、拍照、录像等。其实就是指定相机的用例组合
this.useCaseBundle =
if (useImageDetection) UseCaseBundle.imageAnalysis else UseCaseBundle.takePhoto
if (useImageDetection) UseCaseMode.imageAnalysis else UseCaseMode.takePhoto
//闪光灯配置
this.flashMode = FlashModel.CAMERA_FLASH_AUTO
//android R以下时,在少数display为null的情况下,设置预览,拍照的默认分辨率
Expand Down Expand Up @@ -98,7 +98,7 @@ class CameraExampleActivity2 : AppCompatActivity(), CameraXFragmentEventListener
fun parse(intent:Intent):ManagerConfig{
return ManagerConfig().apply { //return 相机配置实例
//这里指定了打开相机时的默认用例模式,图像分析、拍照、录像等。其实就是指定相机的用例组合
this.useCaseBundle = UseCaseBundle.takePhoto
this.useCaseBundle = UseCaseMode.takePhoto
//闪光灯配置
this.flashMode = FlashModel.CAMERA_FLASH_AUTO
//android R以下时,在少数display为null的情况下,设置预览,拍照的默认分辨率
Expand All @@ -115,7 +115,7 @@ class CameraExampleActivity2 : AppCompatActivity(), CameraXFragmentEventListener
```kotlin
return ManagerConfig().apply { //return 相机配置实例
// 这里指定了打开相机时的默认模式,图像分析、拍照、录像等。
this.useCaseBundle = UseCaseBundle.imageAnalysis
this.useCaseBundle = UseCaseMode.imageAnalysis
}
```

Expand Down

0 comments on commit 1fc873a

Please sign in to comment.