實作分割畫面使用的Fragment
This commit is contained in:
@@ -1,120 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:gravity="center_horizontal" />
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="w,1:1.6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:layout_conversion_absoluteHeight="0dp"
|
||||
tools:layout_conversion_absoluteWidth="411dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/button_play"
|
||||
android:src="@android:drawable/ic_media_play"
|
||||
android:text="@string/button_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/button_stop"
|
||||
android:src="@android:drawable/ic_media_pause"
|
||||
android:text="@string/button_stop" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:columnCount="3"
|
||||
app:rowCount="3">
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video1"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginBottom="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video2"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginBottom="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video3"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginBottom="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video4"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginBottom="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video5"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="1dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginBottom="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video6"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginBottom="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video7"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video8"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="1dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="1dp" />
|
||||
|
||||
<com.hisharp.gstreamer_player.GStreamerSurfaceView
|
||||
android:id="@+id/surface_video9"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginTop="1dp" />
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.gridlayout.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/baseView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
app:columnCount="3"
|
||||
app:rowCount="3"
|
||||
app:useDefaultMargins="false" />
|
||||
@@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">app</string>
|
||||
<string name="app_name">gStreamer Split Video Test</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user