1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright 2018 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<androidx.constraintlayout.widget.ConstraintLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:app="http://schemas.android.com/apk/res-auto"
21    xmlns:tools="http://schemas.android.com/tools"
22    android:layout_width="match_parent"
23    android:layout_height="match_parent">
24
25    <com.android.pump.widget.UriImageView
26        android:id="@+id/activity_movie_details_image"
27        android:layout_width="0dp"
28        android:layout_height="309dp"
29        android:scaleType="centerCrop"
30        app:layout_constraintTop_toTopOf="parent"
31        app:layout_constraintStart_toStartOf="parent"
32        app:layout_constraintEnd_toEndOf="parent"
33        tools:src="@tools:sample/backgrounds/scenic"/>
34
35    <com.google.android.material.appbar.AppBarLayout
36        android:layout_width="match_parent"
37        android:layout_height="wrap_content"
38        android:background="@null"
39        app:layout_constraintTop_toTopOf="parent"
40        app:layout_constraintStart_toStartOf="parent"
41        app:layout_constraintEnd_toEndOf="parent"
42        app:elevation="0dp">
43
44        <androidx.appcompat.widget.Toolbar
45            android:id="@+id/activity_movie_details_toolbar"
46            android:layout_width="match_parent"
47            android:layout_height="?actionBarSize"/>
48
49    </com.google.android.material.appbar.AppBarLayout>
50
51    <com.android.pump.widget.UriImageView
52        android:id="@+id/activity_movie_details_play"
53        android:layout_width="48dp"
54        android:layout_height="48dp"
55        app:layout_constraintTop_toTopOf="@id/activity_movie_details_image"
56        app:layout_constraintBottom_toBottomOf="@id/activity_movie_details_image"
57        app:layout_constraintStart_toStartOf="@id/activity_movie_details_image"
58        app:layout_constraintEnd_toEndOf="@id/activity_movie_details_image"
59        app:srcCompat="@drawable/ic_play"
60        app:tint="?colorControlNormal"
61
62        android:clickable="true"
63        android:focusable="true"
64        android:foreground="?selectableItemBackground"/>
65
66    <android.view.View
67        android:layout_width="0dp"
68        android:layout_height="77dp"
69        android:background="@drawable/shadow"
70        app:layout_constraintBottom_toBottomOf="@id/activity_movie_details_image"
71        app:layout_constraintStart_toStartOf="@id/activity_movie_details_image"
72        app:layout_constraintEnd_toEndOf="@id/activity_movie_details_image"/>
73
74    <com.android.pump.widget.UriImageView
75        android:id="@+id/activity_movie_details_poster"
76        android:layout_width="108dp"
77        android:layout_height="162dp"
78        android:layout_marginStart="24dp"
79        android:layout_marginEnd="24dp"
80        android:scaleType="centerCrop"
81        app:layout_constraintBottom_toBottomOf="@id/activity_movie_details_image"
82        app:layout_constraintStart_toStartOf="@id/activity_movie_details_image"
83        tools:src="@tools:sample/avatars"/>
84
85    <androidx.appcompat.widget.AppCompatTextView
86        android:id="@+id/activity_movie_details_title"
87        android:layout_width="0dp"
88        android:layout_height="wrap_content"
89        android:layout_marginStart="24dp"
90        android:layout_marginEnd="24dp"
91        android:layout_marginTop="24dp"
92        android:textSize="18sp"
93        android:maxLines="3"
94        android:ellipsize="end"
95        app:layout_constraintTop_toBottomOf="@id/activity_movie_details_image"
96        app:layout_constraintStart_toStartOf="parent"
97        app:layout_constraintEnd_toEndOf="parent"
98        tools:text="Title"/>
99
100    <androidx.appcompat.widget.AppCompatTextView
101        android:id="@+id/activity_movie_details_attributes"
102        android:layout_width="0dp"
103        android:layout_height="wrap_content"
104        android:layout_marginTop="4dp"
105        android:textSize="12sp"
106        android:maxLines="1"
107        android:ellipsize="end"
108        app:layout_constraintTop_toBottomOf="@id/activity_movie_details_title"
109        app:layout_constraintStart_toStartOf="@id/activity_movie_details_title"
110        app:layout_constraintEnd_toEndOf="@id/activity_movie_details_title"
111        tools:text="1h 20m"/>
112
113    <androidx.appcompat.widget.AppCompatTextView
114        android:id="@+id/activity_movie_details_synopsis"
115        android:layout_width="0dp"
116        android:layout_height="wrap_content"
117        android:layout_marginTop="16dp"
118        android:maxLines="3"
119        android:ellipsize="end"
120        app:layout_constraintTop_toBottomOf="@id/activity_movie_details_attributes"
121        app:layout_constraintStart_toStartOf="@id/activity_movie_details_title"
122        app:layout_constraintEnd_toEndOf="@id/activity_movie_details_title"
123        tools:text="@tools:sample/lorem/random"/>
124
125</androidx.constraintlayout.widget.ConstraintLayout>
126