1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2020 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:layout_width="0dp"
21    android:layout_weight="1"
22    android:layout_height="@dimen/control_height"
23    android:padding="@dimen/control_padding"
24    android:clickable="false"
25    android:focusable="true"
26    android:screenReaderFocusable="true"
27    android:stateListAnimator="@anim/control_state_list_animator"
28    android:background="@drawable/control_background">
29
30    <ImageView
31        android:id="@+id/icon"
32        android:layout_width="@dimen/control_icon_size"
33        android:layout_height="@dimen/control_icon_size"
34        android:paddingTop="@dimen/control_padding_adjustment"
35        android:clickable="false"
36        android:focusable="false"
37        app:layout_constraintStart_toStartOf="parent"
38        app:layout_constraintTop_toTopOf="parent" />
39
40    <TextView
41        android:id="@+id/status"
42        android:layout_width="0dp"
43        android:layout_height="wrap_content"
44        android:textAppearance="@style/TextAppearance.Control.Status"
45        android:paddingTop="@dimen/control_padding_adjustment"
46        android:paddingStart="@dimen/control_status_padding"
47        android:screenReaderFocusable="false"
48        android:clickable="false"
49        android:focusable="false"
50        android:singleLine="true"
51        android:ellipsize="marquee"
52        android:marqueeRepeatLimit = "marquee_forever"
53        android:textDirection="locale"
54        app:layout_constraintEnd_toEndOf="parent"
55        app:layout_constraintBottom_toBottomOf="@+id/icon"
56        app:layout_constraintStart_toEndOf="@+id/icon" />
57
58    <TextView
59        android:id="@+id/title"
60        android:layout_width="match_parent"
61        android:layout_height="wrap_content"
62        android:textAppearance="@style/TextAppearance.Control.Title"
63        android:paddingLeft="@dimen/control_padding_adjustment"
64        android:paddingRight="@dimen/control_padding_adjustment"
65        android:clickable="false"
66        android:focusable="false"
67        android:maxLines="1"
68        android:ellipsize="end"
69        android:textDirection="locale"
70        app:layout_constraintStart_toStartOf="parent"
71        app:layout_constraintEnd_toEndOf="parent"
72        app:layout_constraintBottom_toTopOf="@id/barrier"/>
73
74    <androidx.constraintlayout.widget.Barrier
75        android:id="@+id/barrier"
76        android:layout_width="wrap_content"
77        android:layout_height="wrap_content"
78        app:barrierDirection="top"
79        app:constraint_referenced_ids="subtitle,favorite" />
80
81    <TextView
82        android:id="@+id/subtitle"
83        android:layout_width="0dp"
84        android:layout_height="wrap_content"
85        android:textAppearance="@style/TextAppearance.Control.Subtitle"
86        android:paddingLeft="@dimen/control_padding_adjustment"
87        android:paddingRight="@dimen/control_padding_adjustment"
88        android:paddingBottom="@dimen/control_padding_adjustment"
89        android:clickable="false"
90        android:focusable="false"
91        android:maxLines="1"
92        android:ellipsize="end"
93        android:textDirection="locale"
94        app:layout_constraintStart_toStartOf="parent"
95        app:layout_constraintEnd_toStartOf="@id/favorite"
96        app:layout_constraintTop_toTopOf="@id/favorite"
97    />
98
99    <CheckBox
100        android:id="@+id/favorite"
101        android:visibility="invisible"
102        android:layout_width="@dimen/controls_management_checkbox_size"
103        android:layout_height="@dimen/controls_management_checkbox_size"
104        android:minHeight="0dp"
105        android:minWidth="0dp"
106        android:gravity="center"
107        android:background="@android:color/transparent"
108        android:clickable="false"
109        android:selectable="false"
110        android:importantForAccessibility="no"
111        app:layout_constraintStart_toEndOf="@id/subtitle"
112        app:layout_constraintEnd_toEndOf="parent"
113        app:layout_constraintBottom_toBottomOf="parent"/>
114
115    <ImageView
116        android:id="@+id/chevron_icon"
117        android:autoMirrored="true"
118        android:src="@drawable/ic_chevron_icon"
119        android:visibility="invisible"
120        android:layout_width="@dimen/control_chevron_icon_size"
121        android:layout_height="@dimen/control_chevron_icon_size"
122        android:clickable="false"
123        android:focusable="false"
124        app:layout_constraintEnd_toEndOf="parent"
125        app:layout_constraintTop_toTopOf="parent"
126        app:layout_constraintBottom_toBottomOf="parent"/>
127</androidx.constraintlayout.widget.ConstraintLayout>
128