Java 安卓摄像头翻转
我已经效仿了。但是,当我将其移植到手机上(以便使用相机)时,预览会向左翻转90度。除此之外,它运行良好 我的问题是:如何“展开”预览 以下是我的布局文件的内容:Java 安卓摄像头翻转,java,android,camera,Java,Android,Camera,我已经效仿了。但是,当我将其移植到手机上(以便使用相机)时,预览会向左翻转90度。除此之外,它运行良好 我的问题是:如何“展开”预览 以下是我的布局文件的内容: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" andro
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<android.view.SurfaceView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/preview"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</android.view.SurfaceView>
</LinearLayout>
此外,当我尝试自己打开手机时,手机会保持“横向”模式
提前谢谢 我以前也有过同样的问题。我刚刚添加了一个参数来将视图旋转90度。将此参数添加到“曲面更改”功能:
parameters.setRotation(90);
当你说“向左翻转90度”时,你的意思是它以纵向或横向结束?当你说“翻转”时,你的意思是“旋转”吗?如果是这样,可能看起来太明显了,但你的方向是水平的。或者我误解了这个问题!是的,它以风景画结束。不管方向是“水平”还是“垂直”,结果都是一样的。