가장 쉬운 방법은 가로 방향의 가로 레이아웃을 만들어 내부에 넣는 것입니다 두 개의 뷰 (SurfaceView 또는 TextureView 또는 GlSurfaceView). 볼
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_weight="1"
android:layout_marginRight="8dp" >
<TextureView
android:id="@+id/double1_texture_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_weight="1" >
<TextureView
android:id="@+id/double2_texture_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
가장 좋은 샘플이 Grafika입니다 : 그리고처럼 될 것이보기 1. 동일한 무게를 제공합니다. 그러나 의 비디오를 비교하려는 경우과 같이 비디오 중 하나를 잘라야한다는 것을 잊지 마십시오. 한 비디오의 왼쪽과 다른 비디오의 왼쪽을 비교해야하기 때문에. 종횡비를 잊지 마세요. 내가 화면의 폭을 요청 활동의에서 onCreate에,
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/right_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/colorAccent" />
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/left_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/colorPrimary" />
</FrameLayout>
프로그래밍을하고 X 축에서 번역합니다
Pls는 몇 가지 코드를 게시 할 수 있습니다. – iMDroid
당신이 얻고있는 결과의 세부 사항들. – iMDroid
가중치 합을 사용하십시오. –