自定义相机预览拉长

时间:2017-05-03 10:04:10

标签: android android-camera motorola

我创建了自定义相机(水平模式下必须)来捕捉图像。 但是我在摩托罗拉g3和g4等设备上遇到了问题,它在三星设备上运行得很好。

可以帮助解决这个问题。

1 个答案:

答案 0 :(得分:0)

使用属性android:adjustViewBounds =“true”

<ImageView
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:adjustViewBounds="true" 
    android:visibility="gone" />
相关问题