blob: 6a8621398191932a251dfd0a4d4d549baec17fb8 [file] [log] [blame]
Matt Pietal22231792020-01-23 09:51:09 -05001<?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"
Matt Pietal31ec9f22020-03-12 09:02:17 -040024 android:clickable="false"
Matt Pietal22231792020-01-23 09:51:09 -050025 android:focusable="true"
Matt Pietal31ec9f22020-03-12 09:02:17 -040026 android:screenReaderFocusable="true"
Lucas Dupin6843f572020-04-13 14:42:43 -070027 android:stateListAnimator="@anim/control_state_list_animator"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -050028 android:layout_marginLeft="@dimen/control_base_item_margin"
29 android:layout_marginRight="@dimen/control_base_item_margin"
Matt Pietal22231792020-01-23 09:51:09 -050030 android:background="@drawable/control_background">
31
32 <ImageView
33 android:id="@+id/icon"
Matt Pietalf8cc0fa2020-03-26 08:48:50 -040034 android:layout_width="@dimen/control_icon_size"
35 android:layout_height="@dimen/control_icon_size"
Matt Pietal8f8953e2020-03-05 08:32:28 -050036 android:paddingTop="@dimen/control_padding_adjustment"
Matt Pietal31ec9f22020-03-12 09:02:17 -040037 android:clickable="false"
38 android:focusable="false"
Matt Pietal22231792020-01-23 09:51:09 -050039 app:layout_constraintStart_toStartOf="parent"
40 app:layout_constraintTop_toTopOf="parent" />
41
42 <TextView
43 android:id="@+id/status"
Matt Pietal5f478c72020-04-01 15:53:54 -040044 android:layout_width="0dp"
Matt Pietal22231792020-01-23 09:51:09 -050045 android:layout_height="wrap_content"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -050046 android:textAppearance="@style/TextAppearance.Control.Status"
Matt Pietal8f8953e2020-03-05 08:32:28 -050047 android:paddingTop="@dimen/control_padding_adjustment"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -050048 android:paddingStart="@dimen/control_status_padding"
Matt Pietal269a7b42020-04-10 10:46:02 -040049 android:screenReaderFocusable="false"
50 android:clickable="false"
Matt Pietal31ec9f22020-03-12 09:02:17 -040051 android:focusable="false"
Matt Pietal5f478c72020-04-01 15:53:54 -040052 android:singleLine="true"
53 android:ellipsize="marquee"
54 android:marqueeRepeatLimit = "marquee_forever"
55 app:layout_constraintEnd_toEndOf="parent"
Matt Pietal22231792020-01-23 09:51:09 -050056 app:layout_constraintBottom_toBottomOf="@+id/icon"
57 app:layout_constraintStart_toEndOf="@+id/icon" />
58
Matt Pietal22231792020-01-23 09:51:09 -050059 <TextView
60 android:id="@+id/title"
Fabian Kozynski9b972e82020-03-26 14:33:11 -040061 android:layout_width="match_parent"
Matt Pietal22231792020-01-23 09:51:09 -050062 android:layout_height="wrap_content"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -050063 android:textAppearance="@style/TextAppearance.Control.Title"
Matt Pietal8f8953e2020-03-05 08:32:28 -050064 android:paddingLeft="@dimen/control_padding_adjustment"
65 android:paddingRight="@dimen/control_padding_adjustment"
Matt Pietal31ec9f22020-03-12 09:02:17 -040066 android:clickable="false"
67 android:focusable="false"
Matt Pietal85878262020-03-18 15:34:46 -040068 android:maxLines="1"
69 android:ellipsize="end"
Fabian Kozynski9b972e82020-03-26 14:33:11 -040070 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" />
Matt Pietal22231792020-01-23 09:51:09 -050080
81 <TextView
82 android:id="@+id/subtitle"
Fabian Kozynski9b972e82020-03-26 14:33:11 -040083 android:layout_width="0dp"
Matt Pietal22231792020-01-23 09:51:09 -050084 android:layout_height="wrap_content"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -050085 android:textAppearance="@style/TextAppearance.Control.Subtitle"
Matt Pietal8f8953e2020-03-05 08:32:28 -050086 android:paddingLeft="@dimen/control_padding_adjustment"
87 android:paddingRight="@dimen/control_padding_adjustment"
88 android:paddingBottom="@dimen/control_padding_adjustment"
Matt Pietal31ec9f22020-03-12 09:02:17 -040089 android:clickable="false"
90 android:focusable="false"
Matt Pietal85878262020-03-18 15:34:46 -040091 android:maxLines="1"
92 android:ellipsize="end"
Fabian Kozynski9b972e82020-03-26 14:33:11 -040093 app:layout_constraintStart_toStartOf="parent"
94 app:layout_constraintEnd_toStartOf="@id/favorite"
Matt Pietal22231792020-01-23 09:51:09 -050095 app:layout_constraintBottom_toBottomOf="parent"
Fabian Kozynski9b972e82020-03-26 14:33:11 -040096 />
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -050097
Fabian Kozynski9b972e82020-03-26 14:33:11 -040098 <CheckBox
99 android:id="@+id/favorite"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -0500100 android:visibility="gone"
Fabian Kozynski9b972e82020-03-26 14:33:11 -0400101 android:layout_width="wrap_content"
102 android:layout_height="wrap_content"
103 android:layout_gravity="bottom|end"
104 android:button="@drawable/controls_btn_star"
Fabian Kozynskiaa1e5482020-04-02 11:22:01 -0400105 android:background="@android:color/transparent"
106 android:clickable="false"
107 android:selectable="false"
108 android:importantForAccessibility="no"
Fabian Kozynski9b972e82020-03-26 14:33:11 -0400109 android:layout_marginTop="4dp"
110 android:layout_marginStart="4dp"
111 app:layout_constraintStart_toEndOf="@id/subtitle"
Fabian Kozynski5fc5f6b2020-02-03 15:21:14 -0500112 app:layout_constraintEnd_toEndOf="parent"
Fabian Kozynski9b972e82020-03-26 14:33:11 -0400113 app:layout_constraintBottom_toBottomOf="parent"/>
Fabian Kozynski443149b2020-02-28 14:14:32 -0500114
Matt Pietal22231792020-01-23 09:51:09 -0500115</androidx.constraintlayout.widget.ConstraintLayout>