Skip to content
New issue

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

fix: Fix Preview stretching on Android #2377

Merged
merged 13 commits into from
Jan 11, 2024
Merged

fix: Fix Preview stretching on Android #2377

merged 13 commits into from
Jan 11, 2024

Conversation

mrousavy
Copy link
Owner

@mrousavy mrousavy commented Jan 11, 2024

What

Fixes the Preview View stretching issue on Android by making sure we always re-compute the layout size when either the surface or the view changes.

If you benefit from this change, say thanks by 💖 sponsoring me on GitHub 💖

Changes

Tested on

Related issues

Copy link

vercel bot commented Jan 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 3:33pm

@mrousavy mrousavy merged commit 322b6fc into main Jan 11, 2024
5 checks passed
@mrousavy mrousavy deleted the fix/preview-stretching branch January 11, 2024 15:33
isaaccolson pushed a commit to isaaccolson/deliveries-mobile that referenced this pull request Oct 30, 2024
* fix: Fix Preview stretching on Android

* fix: Simplify Preview size computation

* fix: Catch `stopRepeating` error

* fix: Fix preview size calculation

* Format code

* Update CameraSession.kt

* Enable CodeScanner in example app

* fix: Also update size on surface change

* Format

* fix: Flip sizes

* Revert that stuff again

* Update PreviewView.kt

* fix: Swap width and height in SurfaceHolder::setFixedSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant