In Progress
Status Update
Comments
ap...@google.com <ap...@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>
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!
ap...@google.com <ap...@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?
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)
```
ju...@google.com <ju...@google.com>
bu...@google.com <bu...@google.com> #6
Would you also set the same TargetRotation to Preview at onOrientationChanged? Let me know if it works.
Description
I'm converting room-runtime to Kotlin Multiplatform and the API tool in androidx is incorrectly flagging the removal of a default value in a parameter.
I had the following Android only class
and I am now converting it to an actual/expect declaration:
then after running
updateApi
I get the following API change error:however it is an error to have a default value in an 'actual' function param, if I try to add the default value to
TableInfo.android.kt
then Kotlin compiler errors out with:When looking at the
.class
file produced, the Kotlin generated default value constructors are present:So it seems to be an incorrect API breakage flag.
Here is my full CL: aosp/2925831, notice I ignore the API change, so remember to remove the ignore to reproduce.