Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使预览匹配父级并尝试填充,但我无法使其工作。屏幕右侧有一条大灰线
我有同样的问题。@Mindshifter 的解决方案对我有用,但您可以在这里查看更多评论(我也在那里发布了类似的解决方案):
https://github.com/googlesamples/android-vision/issues/23
在 CameraSourcePreview.java 中注释这行代码:
if (childHeight > layoutHeight) { childHeight = layoutHeight; childWidth = (int)(((float) layoutHeight / (float) height) * width); }