We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In
preview.setOnPreviewOutputUpdateListener { textureView.surfaceTexture = it.surfaceTexture updateTransform() }
There is now an error in the textureView,surfaceTexture being updated, that the val cannot be reassigned. That line can be replaced with:
textureView.setSurfaceTexture(it.surfaceTexture)
(https://stackoverflow.com/questions/63184908/val-cannot-be-reassigned-in-android-buildtool-30-0-1)
However, while the app compiles, nothing is shown of the preview.
The answer seems to be to replace the listener as follows.
preview.setOnPreviewOutputUpdateListener { val parent = textureView.parent as ViewGroup parent.removeView(textureView) textureView.setSurfaceTexture(it.surfaceTexture) parent.addView(textureView, 0) updateTransform() }
And it works fine.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In
There is now an error in the textureView,surfaceTexture being updated, that the val cannot be reassigned. That line can be replaced with:
(https://stackoverflow.com/questions/63184908/val-cannot-be-reassigned-in-android-buildtool-30-0-1)
However, while the app compiles, nothing is shown of the preview.
The answer seems to be to replace the listener as follows.
And it works fine.
The text was updated successfully, but these errors were encountered: