• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright 2018, 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.cardview.widget.CardView
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    style="@style/ContextualSpace"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    app:contentPadding="@dimen/contextual_padding">
24
25    <androidx.constraintlayout.widget.ConstraintLayout
26        android:layout_width="match_parent"
27        android:layout_height="match_parent"
28        android:layout_gravity="center_vertical|start">
29
30        <ImageView
31            android:id="@+id/icon"
32            android:layout_width="80dp"
33            android:layout_height="80dp"
34            app:layout_constraintStart_toStartOf="parent"
35            app:layout_constraintTop_toTopOf="parent"
36            app:layout_constraintBottom_toBottomOf="parent"/>
37
38        <TextView
39            android:id="@+id/top_line"
40            android:layout_width="0dp"
41            android:layout_height="wrap_content"
42            android:layout_marginStart="@dimen/icon_end_margin"
43            android:singleLine="true"
44            android:textAppearance="?android:attr/textAppearanceLarge"
45            app:layout_constraintEnd_toEndOf="parent"
46            app:layout_constraintHorizontal_bias="0.0"
47            app:layout_constraintStart_toEndOf="@+id/icon"
48            app:layout_constraintTop_toTopOf="parent"
49            app:layout_constraintBottom_toTopOf="@+id/bottom_line_container"
50            app:layout_constraintVertical_chainStyle="packed"/>
51
52        <LinearLayout
53            android:id="@+id/bottom_line_container"
54            android:layout_width="wrap_content"
55            android:layout_height="wrap_content"
56            android:layout_marginStart="@dimen/icon_end_margin"
57            android:layout_marginTop="@dimen/line_gap_margin"
58            android:baselineAligned="true"
59            app:layout_constraintStart_toEndOf="@+id/icon"
60            app:layout_constraintTop_toBottomOf="@+id/top_line"
61            app:layout_constraintBottom_toBottomOf="parent">
62
63            <TextView
64                android:id="@+id/bottom_line"
65                android:layout_width="wrap_content"
66                android:layout_height="wrap_content"
67                android:ellipsize="end"
68                android:maxLines="1"
69                android:textAppearance="?android:attr/textAppearanceLarge"/>
70
71            <TextView
72                android:id="@+id/date_divider"
73                android:layout_width="wrap_content"
74                android:layout_height="wrap_content"
75                android:layout_marginStart="4dp"
76                android:layout_marginEnd="6dp"
77                android:text="&#x2502;"
78                android:textAppearance="?android:attr/textAppearanceLarge"
79                android:textColor="@color/date_divider_bar_color"/>
80
81            <com.android.car.carlauncher.LocalizedTextClock
82                android:id="@+id/date"
83                android:layout_width="wrap_content"
84                android:layout_height="wrap_content"
85                android:format12Hour="@string/date"
86                android:format24Hour="@string/date"
87                android:textAppearance="?android:attr/textAppearanceLarge"/>
88
89        </LinearLayout>
90
91    </androidx.constraintlayout.widget.ConstraintLayout>
92
93</androidx.cardview.widget.CardView>
94