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