我正在使用 compile 'com.google.android.gms:play-services-vision:9.4.0+'
用于二维码和 EAT-8、EAT-13 等。
但我无法控制
<com.testing.CameraSourcePreview
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.testing.GraphicOverlay
android:id="@+id/graphicOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.testing.CameraSourcePreview>
最佳答案
上述问题的解决方案是:
评论或从 CameraSourcePreview 中删除以下行,应该没问题。我遇到了和你一样的问题,现在已经解决了。
if (childHeight > layoutHeight) {
childHeight = layoutHeight;
childWidth = (int)(((float) layoutHeight / (float) height) * width);
关于Android:CameraSourcePreview 没有填满整个屏幕高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44069666/