1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2019 The Android Open Source Project
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6       http://www.apache.org/licenses/LICENSE-2.0
7     Unless required by applicable law or agreed to in writing, software
8     distributed under the License is distributed on an "AS IS" BASIS,
9     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10     See the License for the specific language governing permissions and
11     limitations under the License.
12-->
13<androidx.cardview.widget.CardView
14    xmlns:android="http://schemas.android.com/apk/res/android"
15    xmlns:app="http://schemas.android.com/apk/res-auto"
16    android:layout_width="match_parent"
17    android:layout_height="match_parent"
18    android:elevation="@dimen/dialer_card_elevation"
19    app:cardBackgroundColor="@color/onhold_call_background"
20    app:cardCornerRadius="@dimen/onhold_profile_corner_radius">
21
22    <androidx.constraintlayout.widget.ConstraintLayout
23        android:layout_width="match_parent"
24        android:layout_height="match_parent"
25        android:id="@+id/swap_calls_view"
26        android:background="?android:attr/selectableItemBackground">
27
28        <androidx.constraintlayout.widget.Guideline
29            android:layout_width="wrap_content"
30            android:layout_height="wrap_content"
31            android:id="@+id/guideline"
32            android:orientation="vertical"
33            app:layout_constraintGuide_begin="@dimen/onhold_profile_guideline"/>
34
35        <ImageView
36            android:id="@+id/icon"
37            android:layout_width="@dimen/small_avatar_icon_size"
38            android:layout_height="@dimen/small_avatar_icon_size"
39            android:scaleType="centerCrop"
40            android:layout_marginStart="@dimen/onhold_profile_avatar_margin"
41            app:layout_constraintTop_toTopOf="parent"
42            app:layout_constraintBottom_toBottomOf="parent"
43            app:layout_constraintStart_toStartOf="parent"/>
44
45        <TextView
46            android:id="@+id/title"
47            android:layout_width="wrap_content"
48            android:layout_height="wrap_content"
49            android:theme="@style/Theme.Dialer.BidiText"
50            android:layout_marginEnd="@dimen/onhold_profile_status_margin"
51            android:textAppearance="?android:attr/textAppearanceLarge"
52            android:singleLine="true"
53            app:layout_constraintTop_toTopOf="parent"
54            app:layout_constraintBottom_toBottomOf="parent"
55            app:layout_constraintStart_toStartOf="@id/guideline"
56            app:layout_constraintEnd_toStartOf="@+id/time"/>
57
58        <Chronometer
59            android:id="@id/time"
60            android:layout_width="wrap_content"
61            android:layout_height="wrap_content"
62            android:layout_marginStart="@dimen/onhold_profile_status_margin"
63            android:textAppearance="?android:attr/textAppearanceLarge"
64            android:textColor="@color/onhold_time_color"
65            android:singleLine="true"
66            app:layout_constraintTop_toTopOf="parent"
67            app:layout_constraintBottom_toBottomOf="parent"
68            app:layout_constraintStart_toEndOf="@id/title"
69            app:layout_constraintEnd_toStartOf="@+id/separator"/>
70
71        <TextView
72            android:id="@id/separator"
73            android:layout_width="wrap_content"
74            android:layout_height="wrap_content"
75            android:layout_marginStart="@dimen/onhold_profile_status_margin"
76            android:layout_marginEnd="@dimen/onhold_profile_status_margin"
77            android:textAppearance="?android:attr/textAppearanceLarge"
78            android:singleLine="true"
79            android:text="@string/onhold_call_separator"
80            app:layout_constraintTop_toTopOf="parent"
81            app:layout_constraintBottom_toBottomOf="parent"
82            app:layout_constraintStart_toEndOf="@id/time"
83            app:layout_constraintEnd_toStartOf="@+id/onhold_label"/>
84
85        <TextView
86            android:id="@id/onhold_label"
87            android:layout_width="0dp"
88            android:layout_height="wrap_content"
89            android:textAppearance="?android:attr/textAppearanceLarge"
90            android:singleLine="true"
91            android:text="@string/call_state_hold"
92            android:textColor="@color/onhold_label_color"
93            app:layout_constraintTop_toTopOf="parent"
94            app:layout_constraintBottom_toBottomOf="parent"
95            app:layout_constraintStart_toEndOf="@id/separator"
96            app:layout_constraintEnd_toStartOf="@+id/swap_call"/>
97
98        <TextView
99            android:id="@id/swap_call"
100            android:layout_width="wrap_content"
101            android:layout_height="wrap_content"
102            android:layout_marginEnd="@dimen/onhold_profile_avatar_margin"
103            android:text="@string/swap_call_label"
104            android:textAppearance="?android:attr/textAppearanceLarge"
105            android:singleLine="true"
106            android:textColor="?android:attr/colorAccent"
107            app:layout_constraintTop_toTopOf="parent"
108            app:layout_constraintBottom_toBottomOf="parent"
109            app:layout_constraintEnd_toEndOf="parent"/>
110    </androidx.constraintlayout.widget.ConstraintLayout>
111</androidx.cardview.widget.CardView>
112