Advertisement
mmayoub

activity_main.xml (Video View Example)

Jul 11th, 2023
1,059
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.85 KB | Software | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    tools:context=".MainActivity">
  8.  
  9.     <VideoView
  10.        android:id="@+id/vvVideoView"
  11.        android:layout_width="0dp"
  12.        android:layout_height="0dp"
  13.        android:layout_marginStart="16dp"
  14.        android:layout_marginTop="16dp"
  15.        android:layout_marginEnd="16dp"
  16.        android:layout_marginBottom="16dp"
  17.        app:layout_constraintBottom_toTopOf="@+id/btnPlay"
  18.        app:layout_constraintDimensionRatio="4:3"
  19.        app:layout_constraintEnd_toEndOf="parent"
  20.        app:layout_constraintStart_toStartOf="parent"
  21.        app:layout_constraintTop_toTopOf="parent" />
  22.  
  23.     <Button
  24.        android:id="@+id/btnPlay"
  25.        android:layout_width="wrap_content"
  26.        android:layout_height="wrap_content"
  27.        android:layout_marginBottom="16dp"
  28.        android:text="play"
  29.        app:layout_constraintBottom_toBottomOf="parent"
  30.        app:layout_constraintEnd_toStartOf="@+id/btnStop"
  31.        app:layout_constraintHorizontal_bias="0.5"
  32.        app:layout_constraintStart_toStartOf="parent" />
  33.  
  34.     <Button
  35.        android:id="@+id/btnStop"
  36.        android:layout_width="wrap_content"
  37.        android:layout_height="wrap_content"
  38.        android:text="stop"
  39.        app:layout_constraintBottom_toBottomOf="@+id/btnPlay"
  40.        app:layout_constraintEnd_toEndOf="parent"
  41.        app:layout_constraintHorizontal_bias="0.5"
  42.        app:layout_constraintStart_toEndOf="@+id/btnPlay"
  43.        app:layout_constraintTop_toTopOf="@+id/btnPlay" />
  44. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement