調整架構

This commit is contained in:
Raymond Yang
2023-01-19 12:12:41 +08:00
parent 8288bc57c5
commit e48ebcbb02
20 changed files with 655 additions and 389 deletions
+35
View File
@@ -19,5 +19,40 @@
tools:layout_conversion_absoluteHeight="0dp"
tools:layout_conversion_absoluteWidth="411dp" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="1"
app:layout_constraintEnd_toStartOf="@+id/button2"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/viewPager" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="4"
app:layout_constraintEnd_toStartOf="@+id/button3"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/button"
app:layout_constraintTop_toBottomOf="@+id/viewPager" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/button2"
app:layout_constraintTop_toBottomOf="@+id/viewPager" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,12 @@
<?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"
tools:context=".SplitViewFragment" />
+6 -7
View File
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<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/baseView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_video_view"
android:outlineProvider="background">
<com.hisharp.gstreamer_player.GStreamerSurfaceView
<SurfaceView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -34,16 +33,16 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="4dp"
android:drawableLeft="@drawable/ic_ip_cam_name"
android:drawablePadding="6dp"
android:ellipsize="end"
android:maxLines="1"
android:text="TextView"
android:text=""
android:textColor="@android:color/white"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/videoView"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:drawableStartCompat="@drawable/ic_ip_cam_name" />
<ProgressBar
android:id="@+id/pbLoading"
@@ -51,7 +50,7 @@
android:layout_width="64dp"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/videoView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"