Merge pull request #378 from KryptKode/chore/update-camera-x
Update CameraX to 1.2.0-rc01
This commit is contained in:
commit
c901a3f88e
|
@ -69,7 +69,7 @@ dependencies {
|
|||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
|
||||
implementation 'androidx.window:window:1.1.0-alpha03'
|
||||
|
||||
def camerax_version = '1.2.0-beta01'
|
||||
def camerax_version = '1.2.0-rc01'
|
||||
implementation "androidx.camera:camera-core:$camerax_version"
|
||||
implementation "androidx.camera:camera-camera2:$camerax_version"
|
||||
implementation "androidx.camera:camera-video:$camerax_version"
|
||||
|
|
|
@ -196,8 +196,6 @@ class CameraXPreview(
|
|||
captureUseCase,
|
||||
)
|
||||
}
|
||||
|
||||
previewUseCase.setSurfaceProvider(previewView.surfaceProvider)
|
||||
preview = previewUseCase
|
||||
setupZoomAndFocus()
|
||||
setFlashlightState(config.flashlightState)
|
||||
|
@ -215,7 +213,9 @@ class CameraXPreview(
|
|||
return Preview.Builder()
|
||||
.setTargetRotation(rotation)
|
||||
.setTargetResolution(resolution)
|
||||
.build()
|
||||
.build().apply {
|
||||
setSurfaceProvider(previewView.surfaceProvider)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCaptureUseCase(resolution: Size, rotation: Int): UseCase {
|
||||
|
|
Loading…
Reference in New Issue