googlesamples / mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.52k stars 2.92k forks source link

Material Showcase: Camera view of barcode scanner not fullscreen #116

Open gregor opened 4 years ago

gregor commented 4 years ago

I have been tinkering with the details of the barcode scanner sample in the material showcase app. On my Sony XPERIA XZ2 running Android 10, the camera view is not fullscreen though. There is a black bar at the bottom of the screen. I have taken a screenshot where I made this more obvious by removing the scrim and changing the background color of the activity to white.

I am new to Android and Kotlin and have so far been unable fully understand CameraSourcePreview code. Where do I need to make adjustments in order to change this behavior?

Screenshot

calren commented 4 years ago

Hey @gregor , do you mean there's that slim white bar at the bottom right above the bottom navigation bar?

I haven't looked into it yet, but if the problem I described above is what you mean, it might be helpful to look at the CameraSourcePreview's onLayout

Tahir047 commented 3 years ago

Hi there,

I am facing the same. I have tried so many things but could not find any suitable solution. If you already found the solution do mention any link

gregor commented 3 years ago

No, I have not 🙈

jinqian commented 3 years ago

Hello I'm having a similar issue on my Samsung S8, instead, it's a black stripe and the problem is definitely still in the sample.

@calren are you planning on pushing a fix for this problem? Thank you :)

mlkit-sample-bottom-stripe-bug