• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<androidx.constraintlayout.widget.ConstraintLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    android:id="@+id/playback_container"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent">
23
24    <include layout="@layout/ui_guides"/>
25
26    <Space
27        android:id="@+id/control_bar_first_row_guideline"
28        android:layout_width="0dp"
29        android:layout_height="@dimen/control_bar_height"
30        android:layout_marginBottom="@dimen/control_bar_margin_bottom"
31        app:layout_constraintBottom_toBottomOf="parent"/>
32
33    <com.android.car.apps.common.BackgroundImageView
34        android:id="@+id/playback_background"
35        android:layout_width="match_parent"
36        android:layout_height="match_parent"/>
37
38    <include
39        layout="@layout/scrim_overlay"
40        android:id="@+id/background_scrim"
41        android:layout_width="0dp"
42        android:layout_height="0dp"
43        app:layout_constraintTop_toTopOf="parent"
44        app:layout_constraintBottom_toBottomOf="parent"
45        app:layout_constraintStart_toStartOf="parent"
46        app:layout_constraintEnd_toEndOf="parent"/>
47
48    <include
49        style="@style/MetadataContainerStyle"
50        android:id="@+id/metadata_container"
51        layout="@layout/metadata_normal"
52        app:layout_constraintStart_toStartOf="parent"
53        app:layout_constraintEnd_toEndOf="parent"
54        app:layout_constraintTop_toBottomOf="@id/ui_content_top_guideline"
55        app:layout_constraintBottom_toTopOf="@+id/control_bar_first_row_guideline"/>
56
57    <!-- @id/playback_seek_bar should be hidden when @id/control_bar_scrim is expanded, and shown
58    when the scrim is collapsed. Since its visibility is also controlled by MetadataController, it
59    could become visible again even if the scrim is still expanded. To solve that we add a wrapper
60    around it and hide/show the wrapper when the scrim is expanded/collapsed.-->
61    <com.android.car.ui.FocusArea
62        style="@style/SeekBarStyle"
63        android:id="@+id/playback_seek_bar_container"
64        android:layout_gravity="center"
65        android:layout_marginStart="@dimen/playback_seekbar_margin_x"
66        android:layout_marginEnd="@dimen/playback_seekbar_margin_x"
67        app:layout_constraintStart_toStartOf="parent"
68        app:layout_constraintEnd_toEndOf="parent"
69        app:layout_constraintTop_toBottomOf="@+id/metadata_container"
70        app:layout_constraintBottom_toTopOf="@+id/control_bar_first_row_guideline">
71        <SeekBar
72            android:id="@+id/playback_seek_bar"
73            android:layout_width="match_parent"
74            android:layout_height="match_parent"
75            android:clickable="false"
76            android:paddingEnd="@dimen/playback_seekbar_padding_x"
77            android:paddingStart="@dimen/playback_seekbar_padding_x"
78            android:progressDrawable="@drawable/seekbar_progress"
79            android:thumb="@drawable/seekbar_thumb"
80            android:thumbOffset="@dimen/playback_seekbar_thumb_offset"
81            android:splitTrack="false"
82            android:progressTint="@color/progress_bar_highlight"
83            android:progressBackgroundTint="@color/progress_bar_background"
84            android:foreground="@drawable/seekbar_foreground"/>
85    </com.android.car.ui.FocusArea>
86
87    <Space
88        android:id="@+id/queue_list_top_constraint"
89        android:layout_width="match_parent"
90        android:layout_height="@dimen/fragment_playback_queue_overlap_top"
91        app:layout_constraintBottom_toBottomOf="@+id/ui_content_top_guideline"/>
92
93    <Space
94        android:id="@+id/queue_list_bottom_constraint"
95        android:layout_width="match_parent"
96        android:layout_height="@dimen/fragment_playback_queue_overlap_bottom"
97        app:layout_constraintTop_toTopOf="@+id/control_bar_first_row_guideline"/>
98
99    <com.android.car.ui.FocusArea
100        android:id="@+id/queue_container"
101        android:layout_width="match_parent"
102        android:layout_height="0dp"
103        app:layout_constraintTop_toTopOf="@+id/queue_list_top_constraint"
104        app:layout_constraintBottom_toBottomOf="@+id/queue_list_bottom_constraint">
105        <com.android.car.ui.recyclerview.CarUiRecyclerView
106            android:id="@+id/queue_list"
107            android:layout_width="match_parent"
108            android:layout_height="match_parent"
109            android:visibility="gone"
110            android:fadeScrollbars="true"
111            android:requiresFadingEdge="vertical"
112            android:fadingEdgeLength="@dimen/queue_fading_edge_length"/>
113    </com.android.car.ui.FocusArea>
114
115    <include
116        layout="@layout/scrim_overlay"
117        android:id="@+id/control_bar_scrim"
118        android:layout_width="0dp"
119        android:layout_height="0dp"
120        app:layout_constraintTop_toTopOf="parent"
121        app:layout_constraintBottom_toBottomOf="parent"
122        app:layout_constraintStart_toStartOf="parent"
123        app:layout_constraintEnd_toEndOf="parent"/>
124
125    <com.android.car.ui.FocusArea
126        android:layout_width="wrap_content"
127        android:layout_height="wrap_content"
128        android:layout_marginHorizontal="@dimen/control_bar_margin_x"
129        android:layout_marginBottom="@dimen/control_bar_margin_bottom"
130        app:layout_constraintBottom_toBottomOf="parent"
131        app:layout_constraintStart_toStartOf="parent"
132        app:layout_constraintEnd_toEndOf="parent">
133        <com.android.car.media.common.PlaybackControlsActionBar
134            android:id="@+id/playback_controls"
135            style="@style/ControlBar"
136            app:columns="5"
137            app:enableOverflow="true"/>
138    </com.android.car.ui.FocusArea>
139</androidx.constraintlayout.widget.ConstraintLayout>
140