~captainepoch/husky

ref: f6629fef7a529d1f91df0c0c17dbea336ca2f401 husky/husky/app/src/main/res/layout/fragment_view_video.xml -rw-r--r-- 2.3 KiB
f6629fefAdolfo Santiago Show video controls always at the bottom 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?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/videoContainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clickable="true"
    android:focusable="true">

    <TextView
        android:id="@+id/mediaDescription"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="?attr/actionBarSize"
        android:background="#60000000"
        android:hyphenationFrequency="full"
        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" />

    <com.google.android.exoplayer2.ui.PlayerView
        android:id="@+id/videoView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@id/videoControls"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/mediaDescription"
        app:resize_mode="fixed_width"
        app:surface_type="surface_view"
        app:use_controller="false" />

    <com.google.android.exoplayer2.ui.PlayerControlView
        android:id="@+id/videoControls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:show_timeout="0"
        tools:visibility="visible" />

    <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" />

</androidx.constraintlayout.widget.ConstraintLayout>