1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2022 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<!-- CoordinatorLayout is necessary for Snackbar to operate correctly. -->
19<androidx.coordinatorlayout.widget.CoordinatorLayout
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    xmlns:app="http://schemas.android.com/apk/res-auto"
22    android:layout_width="match_parent"
23    android:layout_height="match_parent">
24
25    <FrameLayout
26        android:id="@+id/preview_player_container"
27        android:layout_width="match_parent"
28        android:layout_height="match_parent"
29        android:layout_gravity="center">
30
31        <com.google.android.exoplayer2.ui.AspectRatioFrameLayout
32            android:id="@+id/preview_player_frame"
33            android:layout_width="match_parent"
34            android:layout_height="match_parent"
35            android:layout_gravity="center">
36
37            <SurfaceView
38                android:id="@+id/preview_player_view"
39                android:layout_width="match_parent"
40                android:layout_height="match_parent" />
41        </com.google.android.exoplayer2.ui.AspectRatioFrameLayout>
42
43        <FrameLayout
44            android:id="@+id/preview_player_controls"
45            android:layout_width="match_parent"
46            android:layout_height="match_parent"
47            android:layout_gravity="center">
48
49            <include
50                android:layout_width="match_parent"
51                android:layout_height="match_parent"
52                layout="@layout/preview_video_controls" />
53        </FrameLayout>
54    </FrameLayout>
55
56    <ImageView
57        android:id="@+id/preview_video_image"
58        android:layout_width="match_parent"
59        android:layout_height="match_parent"
60        android:layout_gravity="center"
61        android:scaleType="fitCenter"
62        android:contentDescription="@null" />
63
64
65    <com.google.android.material.progressindicator.CircularProgressIndicator
66        android:id="@+id/preview_progress_indicator"
67        android:layout_width="wrap_content"
68        android:layout_height="wrap_content"
69        android:layout_gravity="center"
70        android:gravity="center"
71        android:indeterminate="true"
72        android:visibility="gone"
73        app:indicatorColor="@color/picker_default_white"
74        app:indicatorSize="@dimen/preview_progress_indicator_size" />
75</androidx.coordinatorlayout.widget.CoordinatorLayout>
76