enioka-Haute-Couture / enioka_scan

Integration library for all your Android hardware barcode scanner integration needs
Apache License 2.0
52 stars 4 forks source link

#150 - No longer allow resolutions higher than device display #154

Closed DaSpood closed 10 months ago

DaSpood commented 10 months ago

150

Fix handling of portrait/landscape orientations in resolution helper, and prevent using resolutions that are higher than the available space.

While this does not affect the preview in fillAvailableSpace mode besides the resolution cap (this mode still stretches by design), this should (it did when tested) prevent the fitToPicture mode from stretching/flattening while it tries to fit inside the view using a combination of higher resolution and different aspect ratio.