Fixed
Status Update
Comments
au...@google.com <au...@google.com> #2
After some googling I found https://github.com/android/camera-samples/blob/master/CameraXBasic/app/src/main/java/com/android/example/cameraxbasic/utils/AutoFitPreviewBuilder.kt which does what I want. Would it be possible to fold this into the main library or at least make it configurable without the need for that class?
ju...@google.com <ju...@google.com> #3
Hi Charcoal,
Are we getting a crop mode here? Thanks!
Are we getting a crop mode here? Thanks!
au...@google.com <au...@google.com> #4
Hello,
Thanks for raising this up. May we know did you set aspect ratio or resolution for Preview use case? And could you also attach the captured image file?
Thanks for raising this up. May we know did you set aspect ratio or resolution for Preview use case? And could you also attach the captured image file?
ju...@google.com <ju...@google.com>
ap...@google.com <ap...@google.com> #5
The captured image file is part of the image file that I've already attached (the right part).
I did not set anything on the Preview use case other than the lens facing.
```
val cameraPreview = Preview(Builder()
.setLensFacing(CameraX.LensFacing.BACK)
.build())
cameraPreview.setOnPreviewOutputUpdateListener {
// Every time the viewfinder is updated, recompute the layout. By removing and re-adding it.
val parent = parent as ViewGroup
parent.removeView(this)
parent.addView(this, 0)
surfaceTexture = it.surfaceTexture
updateTransform()
}
CameraX.bindToLifecycle(lifecycleOwner, cameraPreview, *useCase)
```
I did not set anything on the Preview use case other than the lens facing.
```
val cameraPreview = Preview(Builder()
.setLensFacing(CameraX.LensFacing.BACK)
.build())
cameraPreview.setOnPreviewOutputUpdateListener {
// Every time the viewfinder is updated, recompute the layout. By removing and re-adding it.
val parent = parent as ViewGroup
parent.removeView(this)
parent.addView(this, 0)
surfaceTexture = it.surfaceTexture
updateTransform()
}
CameraX.bindToLifecycle(lifecycleOwner, cameraPreview, *useCase)
```
ap...@google.com <ap...@google.com> #6
Would you also set the same TargetRotation to Preview at onOrientationChanged? Let me know if it works.
ap...@google.com <ap...@google.com> #7
Hi There,
It's been just over a month and we are clearing out issues without response. If you have any feedback please feel free to reopen or file another issue. Thanks!
ju...@google.com <ju...@google.com>
ap...@google.com <ap...@google.com> #8
This should be caused by same root cause of https://b.corp.google.com/issues/148763432 .
There is default aspect ratio custom set to ImageCapture use case but it is not updated to match the new target rotation value.
There is default aspect ratio custom set to ImageCapture use case but it is not updated to match the new target rotation value.
Description
Add a rule about prohibiting data classes in public API to verification tooling (metalava or any other step).
Reason: data classes cannot maintain binary compatibility. See Avoid using data classes in your API
Example of violation in AOSP: aosp/3326539