fix videos not always keeping aspect ratio (#1508)
parent
931365f00e
commit
a387b9de20
@ -1,46 +1,43 @@ |
||||
<?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:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:layout_gravity="center" |
||||
android:id="@+id/videoContainer" |
||||
android:clickable="true" |
||||
android:focusable="true"> |
||||
|
||||
<VideoView |
||||
android:id="@+id/videoPlayer" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
android:layout_gravity="center" |
||||
/> |
||||
|
||||
<TextView |
||||
android:id="@+id/mediaDescription" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="?attr/actionBarSize" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
android:background="#60000000" |
||||
android:lineSpacingMultiplier="1.1" |
||||
android:padding="8dp" |
||||
android:textAlignment="center" |
||||
android:textColor="#eee" |
||||
android:textSize="?attr/status_text_medium" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
tools:text="Some media description" /> |
||||
|
||||
<VideoView |
||||
android:id="@+id/videoView" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="match_parent" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<ProgressBar |
||||
android:id="@+id/progressBar" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
android:layout_gravity="center" /> |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
Loading…
Reference in new issue