【发布时间】:2016-12-13 07:09:02
【问题描述】:
我要在原点相机预览画面,左右倒车预览。
我想用Matrix
首先,显示相机预览部分。 GLFragment.class
private GLStreamView streamView = null;
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
final View fragment =inflater.inflate(R.layout.gl_view, container, false);
stream = (GLStreamView) fragment.findViewById(R.id.gl_stream);
...
return fragment;
}
Stream 是相机预览屏幕。
和 gl_view.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="0dp"
tools:context="kr.co.test.video.GLFragment">
<kr.co.test.video.GLStreamView
android:id="@+id/gl_stream"
android:layout_width="480dp"
android:layout_height="480dp"
android:layout_gravity="center"/>
<FrameLayout>
我想说的是左右倒车预览。
所以,我尝试使用Matrix
但我不知道如何使用矩阵。
使用矩阵对吗?
请问如何使用左右倒车预览画面。
谢谢。
【问题讨论】: