• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:layout_marginLeft="@dimen/control_base_item_margin"
29    android:layout_marginRight="@dimen/control_base_item_margin"
30    android:background="@drawable/control_background">
31
32    <ImageView
33        android:id="@+id/icon"
34        android:layout_width="@dimen/control_icon_size"
35        android:layout_height="@dimen/control_icon_size"
36        android:paddingTop="@dimen/control_padding_adjustment"
37        android:clickable="false"
38        android:focusable="false"
39        app:layout_constraintStart_toStartOf="parent"
40        app:layout_constraintTop_toTopOf="parent" />
41
42    <TextView
43        android:id="@+id/status"
44        android:layout_width="0dp"
45        android:layout_height="wrap_content"
46        android:textAppearance="@style/TextAppearance.Control.Status"
47        android:paddingTop="@dimen/control_padding_adjustment"
48        android:paddingStart="@dimen/control_status_padding"
49        android:screenReaderFocusable="false"
50        android:clickable="false"
51        android:focusable="false"
52        android:singleLine="true"
53        android:ellipsize="marquee"
54        android:marqueeRepeatLimit = "marquee_forever"
55        android:textDirection="locale"
56        app:layout_constraintEnd_toEndOf="parent"
57        app:layout_constraintBottom_toBottomOf="@+id/icon"
58        app:layout_constraintStart_toEndOf="@+id/icon" />
59
60    <TextView
61        android:id="@+id/title"
62        android:layout_width="match_parent"
63        android:layout_height="wrap_content"
64        android:textAppearance="@style/TextAppearance.Control.Title"
65        android:paddingLeft="@dimen/control_padding_adjustment"
66        android:paddingRight="@dimen/control_padding_adjustment"
67        android:clickable="false"
68        android:focusable="false"
69        android:maxLines="1"
70        android:ellipsize="end"
71        android:textDirection="locale"
72        app:layout_constraintStart_toStartOf="parent"
73        app:layout_constraintEnd_toEndOf="parent"
74        app:layout_constraintBottom_toTopOf="@id/barrier"/>
75
76    <androidx.constraintlayout.widget.Barrier
77        android:id="@+id/barrier"
78        android:layout_width="wrap_content"
79        android:layout_height="wrap_content"
80        app:barrierDirection="top"
81        app:constraint_referenced_ids="subtitle,favorite" />
82
83    <TextView
84        android:id="@+id/subtitle"
85        android:layout_width="0dp"
86        android:layout_height="wrap_content"
87        android:textAppearance="@style/TextAppearance.Control.Subtitle"
88        android:paddingLeft="@dimen/control_padding_adjustment"
89        android:paddingRight="@dimen/control_padding_adjustment"
90        android:paddingBottom="@dimen/control_padding_adjustment"
91        android:clickable="false"
92        android:focusable="false"
93        android:maxLines="1"
94        android:ellipsize="end"
95        android:textDirection="locale"
96        app:layout_constraintStart_toStartOf="parent"
97        app:layout_constraintEnd_toStartOf="@id/favorite"
98        app:layout_constraintTop_toTopOf="@id/favorite"
99    />
100
101    <CheckBox
102        android:id="@+id/favorite"
103        android:visibility="invisible"
104        android:layout_width="@dimen/controls_management_checkbox_size"
105        android:layout_height="@dimen/controls_management_checkbox_size"
106        android:minHeight="0dp"
107        android:minWidth="0dp"
108        android:gravity="center"
109        android:background="@android:color/transparent"
110        android:clickable="false"
111        android:selectable="false"
112        android:importantForAccessibility="no"
113        app:layout_constraintStart_toEndOf="@id/subtitle"
114        app:layout_constraintEnd_toEndOf="parent"
115        app:layout_constraintBottom_toBottomOf="parent"/>
116
117</androidx.constraintlayout.widget.ConstraintLayout>
118