Credntia / MVBarcodeReader

A Barcode scanner library for Android. Uses the Google Play Services' mobile vision api for barcode detection.
Apache License 2.0
68 stars 22 forks source link

Have preview fill fragment #1

Closed alecgorge closed 7 years ago

alecgorge commented 7 years ago

Right now, if you embed the scanner in the fragment the preview does not take up the whole screen and there is some black area on the right hand side.

It seems to be resized to fit with the proper aspect ratio. Is there an option to have it fill all available space even if it means cropping it a bit?

Thanks for such a useful library! It works great!

iamMehedi commented 7 years ago

@alecgorge currently there is no such option to force the preview size to fill available space. The preview size is resized to match the aspect ratio of the chosen camera resolution and it tries to fill available space if that's possible without breaking the aspect ratio. I'll see what I can do to add such an option.

iamMehedi commented 7 years ago

@alecgorge This should be resolved in the latest version of the library (1.0.0).

alecgorge commented 7 years ago

Thank you! This works great!