• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2020 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8  http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<androidx.constraintlayout.widget.ConstraintLayout
17    xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:app="http://schemas.android.com/apk/res-auto"
19    xmlns:tools="http://schemas.android.com/tools"
20    android:layout_width="match_parent"
21    android:layout_height="@dimen/message_history_item_height"
22    tools:background="@color/background_image_30p_black">
23
24    <ImageView
25        android:id="@+id/unread_indicator"
26        android:layout_width="@dimen/unread_icon_size"
27        android:layout_height="@dimen/unread_icon_size"
28        android:layout_marginEnd="@dimen/unread_icon_marginEnd"
29        android:contentDescription="@string/cd_unread"
30        android:scaleType="centerCrop"
31        android:src="@color/unread_dot_color"
32        app:layout_constraintBottom_toBottomOf="@id/icon"
33        app:layout_constraintEnd_toStartOf="@id/icon"
34        app:layout_constraintTop_toTopOf="@id/icon" />
35
36    <ImageView
37        android:id="@+id/icon"
38        android:layout_width="@dimen/avatar_icon_size"
39        android:layout_height="@dimen/avatar_icon_size"
40        android:layout_marginStart="@dimen/message_history_item_padding"
41        android:contentDescription="@string/cd_conversation_icon"
42        android:scaleType="centerCrop"
43        app:layout_constraintBottom_toBottomOf="parent"
44        app:layout_constraintStart_toStartOf="parent"
45        app:layout_constraintTop_toTopOf="parent"
46        tools:src="@color/car_red_500a" />
47
48    <ImageView
49        android:id="@+id/last_action_icon_view"
50        android:layout_width="@dimen/subtitle_icon_width"
51        android:layout_height="0dp"
52        android:contentDescription="@string/cd_icon_indicating_the_last_action"
53        android:scaleType="centerInside"
54        android:src="@drawable/car_ui_icon_reply"
55        app:layout_constraintBottom_toBottomOf="@id/time_text"
56        app:layout_constraintStart_toStartOf="@id/guideline_begin"
57        app:layout_constraintTop_toBottomOf="@id/title"
58        app:layout_constraintTop_toTopOf="@id/time_text" />
59
60    <ImageView
61        android:id="@+id/reply_action_button"
62        android:layout_width="0dp"
63        android:layout_height="match_parent"
64        android:background="?android:attr/selectableItemBackground"
65        android:contentDescription="@string/cd_reply_action_button"
66        android:scaleType="center"
67        android:src="@drawable/car_ui_icon_reply"
68        app:layout_constraintBottom_toBottomOf="parent"
69        app:layout_constraintEnd_toStartOf="@id/mute_action_button"
70        app:layout_constraintStart_toEndOf="@id/guideline_end"
71        app:layout_constraintTop_toTopOf="parent" />
72
73    <ImageView
74        android:id="@+id/mute_action_button"
75        android:layout_width="0dp"
76        android:layout_height="match_parent"
77        android:background="?android:attr/selectableItemBackground"
78        android:contentDescription="@string/cd_mute_button"
79        android:scaleType="center"
80        android:src="@drawable/car_ui_icon_toggle_mute"
81        app:layout_constraintBottom_toBottomOf="parent"
82        app:layout_constraintEnd_toEndOf="parent"
83        app:layout_constraintStart_toEndOf="@id/reply_action_button"
84        app:layout_constraintTop_toTopOf="parent" />
85
86    <TextView
87        android:id="@+id/title"
88        android:layout_width="0dp"
89        android:layout_height="wrap_content"
90        android:layout_marginEnd="@dimen/message_history_text_margin_end"
91        android:singleLine="true"
92        android:theme="@style/Theme.Messaging.BidiText"
93        app:layout_constraintBottom_toTopOf="@+id/text"
94        app:layout_constraintEnd_toEndOf="@id/guideline_end"
95        app:layout_constraintStart_toStartOf="@id/guideline_begin"
96        app:layout_constraintTop_toTopOf="parent"
97        app:layout_constraintVertical_chainStyle="packed" />
98
99    <TextView
100        android:id="@+id/time_text"
101        android:layout_width="wrap_content"
102        android:layout_height="wrap_content"
103        android:layout_marginStart="@dimen/message_history_icons_margin"
104        android:singleLine="true"
105        app:layout_constraintStart_toEndOf="@id/last_action_icon_view"
106        app:layout_constraintTop_toBottomOf="@id/title"
107        tools:text="14:02 PM" />
108
109    <TextView
110        android:id="@+id/dot"
111        android:layout_width="wrap_content"
112        android:layout_height="wrap_content"
113        android:layout_marginStart="@dimen/message_history_icons_margin"
114        android:singleLine="true"
115        android:text="@string/dot"
116        android:visibility="gone"
117        app:layout_constraintBottom_toBottomOf="@id/text"
118        app:layout_constraintStart_toEndOf="@id/time_text"
119        app:layout_constraintTop_toTopOf="@id/text"
120        tools:visibility="visible" />
121
122    <TextView
123        android:id="@id/text"
124        android:layout_width="0dp"
125        android:layout_height="wrap_content"
126        android:layout_marginEnd="@dimen/message_history_text_margin_end"
127        android:layout_marginStart="@dimen/message_history_icons_margin"
128        android:singleLine="true"
129        app:layout_constraintBottom_toBottomOf="parent"
130        app:layout_constraintEnd_toEndOf="@id/guideline_end"
131        app:layout_constraintStart_toEndOf="@id/dot"
132        app:layout_constraintTop_toBottomOf="@id/title"
133        tools:text="Replied" />
134
135    <View
136        android:id="@+id/play_action_touch_view"
137        android:layout_width="0dp"
138        android:layout_height="match_parent"
139        android:background="?android:attr/selectableItemBackground"
140        app:layout_constraintBottom_toBottomOf="parent"
141        app:layout_constraintEnd_toStartOf="@id/guideline_end"
142        app:layout_constraintHorizontal_bias="0.0"
143        app:layout_constraintStart_toStartOf="parent"
144        app:layout_constraintTop_toTopOf="parent"
145        app:layout_constraintVertical_bias="0.0" />
146
147    <View
148        android:id="@+id/divider"
149        android:layout_width="@dimen/vertical_divider_width"
150        android:layout_height="match_parent"
151        android:layout_marginBottom="@dimen/vertical_divider_inset"
152        android:layout_marginTop="@dimen/vertical_divider_inset"
153        android:background="@color/divider_color"
154        app:layout_constraintStart_toStartOf="@id/guideline_end" />
155
156    <androidx.constraintlayout.widget.Guideline
157        android:id="@+id/guideline_begin"
158        android:layout_width="wrap_content"
159        android:layout_height="wrap_content"
160        android:orientation="vertical"
161        app:layout_constraintGuide_begin="@dimen/message_history_guideline_begin" />
162
163    <androidx.constraintlayout.widget.Guideline
164        android:id="@+id/guideline_end"
165        android:layout_width="wrap_content"
166        android:layout_height="wrap_content"
167        android:orientation="vertical"
168        app:layout_constraintGuide_end="200dp" />
169</androidx.constraintlayout.widget.ConstraintLayout>
170