1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2015 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<!-- 18 Layout for the expand suggestion card in QuickContact. 19--> 20<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" 21 xmlns:card_view="http://schemas.android.com/apk/res-auto" 22 style="@style/ExpandingEntryCardStyle" 23 android:layout_height="wrap_content" 24 android:layout_width="match_parent" 25 android:visibility="gone" 26 android:id="@+id/expand_suggestion_card"> 27 28 <LinearLayout 29 android:layout_height="wrap_content" 30 android:layout_width="match_parent" 31 android:orientation="vertical"> 32 33 <TextView 34 android:id="@+id/expand_suggestion_card_title" 35 android:layout_width="match_parent" 36 android:layout_height="wrap_content" 37 android:textAppearance="?android:attr/textAppearanceMedium" 38 android:textStyle="bold" 39 android:textColor="@color/quickcontact_entry_header_text_color" 40 android:singleLine="true" 41 android:ellipsize="end" 42 android:textAlignment="viewStart" 43 android:paddingTop="@dimen/quickcontact_suggestion_card_image_spacing" 44 android:paddingBottom="@dimen/quickcontact_suggestion_card_image_spacing" 45 android:paddingStart="@dimen/quickcontact_suggestion_card_image_spacing"/> 46 47 <TextView 48 android:id="@+id/expand_suggestion_card_help" 49 android:textSize="@dimen/quickcontact_expanding_help_text_size" 50 android:text="@string/suggestion_card_help_message" 51 android:layout_width="match_parent" 52 android:layout_height="wrap_content" 53 android:textColor="@color/quickcontact_entry_header_text_color" 54 android:lineSpacingMultiplier="1.2" 55 android:textAlignment="viewStart" 56 android:paddingBottom="@dimen/quickcontact_suggestion_card_image_spacing" 57 android:paddingStart="@dimen/quickcontact_suggestion_card_image_spacing" 58 android:paddingEnd="@dimen/quickcontact_suggestion_card_image_spacing"/> 59 60 <TextView 61 android:id="@+id/expand_suggestion_card_this_contact" 62 android:textAppearance="?android:attr/textAppearanceSmall" 63 android:text="@string/suggestion_card_this_contact_title" 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" 66 android:textColor="@color/quickcontact_entry_sub_header_text_color" 67 android:singleLine="true" 68 android:ellipsize="end" 69 android:textAlignment="viewStart" 70 android:paddingStart="@dimen/quickcontact_suggestion_card_image_spacing"/> 71 72 <LinearLayout 73 android:layout_height="@dimen/quickcontact_expanding_item_height" 74 android:layout_width="match_parent" 75 android:orientation="horizontal"> 76 77 <ImageView 78 android:id="@+id/suggestion_icon" 79 android:layout_width="@dimen/quickcontact_suggestion_card_icon_height" 80 android:layout_height="@dimen/quickcontact_suggestion_card_icon_width" 81 android:layout_gravity="center_vertical" 82 android:layout_marginStart="@dimen/quickcontact_suggestion_card_image_spacing" 83 android:scaleType="fitCenter" /> 84 85 <LinearLayout 86 android:id="@+id/suggestion_for_contact_info" 87 android:layout_width="wrap_content" 88 android:layout_height="wrap_content" 89 android:layout_marginStart="@dimen/quickcontact_expanding_item_image_padding" 90 android:layout_weight="1" 91 android:orientation="vertical" 92 android:layout_gravity="center_vertical"> 93 94 <TextView 95 android:id="@+id/suggestion_for_name" 96 android:layout_width="wrap_content" 97 android:layout_height="wrap_content" 98 android:layout_weight="1" 99 android:textAppearance="?android:attr/textAppearanceMedium" 100 android:textColor="@color/quickcontact_entry_header_text_color" 101 android:singleLine="true" 102 android:ellipsize="end" 103 android:layout_marginTop="@dimen/quickcontact_suggestion_card_layout_margin" /> 104 105 <TextView 106 android:id="@+id/suggestion_for_contacts_number" 107 android:layout_width="wrap_content" 108 android:layout_height="wrap_content" 109 android:textAppearance="?android:attr/textAppearanceSmall" 110 android:layout_marginBottom="@dimen/quickcontact_suggestion_card_layout_margin" 111 android:singleLine="true" 112 android:ellipsize="end" /> 113 114 </LinearLayout> 115 116 </LinearLayout> 117 118 <TextView 119 android:id="@+id/expand_suggestion_card_duplicates_title" 120 android:textAppearance="?android:attr/textAppearanceSmall" 121 android:text="@string/suggestion_card_duplicates_title" 122 android:layout_width="match_parent" 123 android:layout_height="wrap_content" 124 android:textColor="@color/quickcontact_entry_sub_header_text_color" 125 android:singleLine="true" 126 android:ellipsize="end" 127 android:textAlignment="viewStart" 128 android:paddingStart="@dimen/quickcontact_suggestion_card_image_spacing"/> 129 130 <LinearLayout 131 android:layout_width="match_parent" 132 android:layout_height="wrap_content" 133 android:id="@+id/suggestion_list" 134 android:animateLayoutChanges="true" 135 android:orientation="vertical" /> 136 137 <LinearLayout 138 android:layout_width="wrap_content" 139 android:layout_height="@dimen/quickcontact_expanding_button_section_height" 140 android:layout_gravity="center_vertical|end" 141 android:layout_marginEnd="@dimen/quickcontact_expanding_button_right_padding" 142 android:layout_marginRight="@dimen/quickcontact_expanding_button_right_padding" 143 android:layout_marginTop="@dimen/quickcontact_expanding_button_section_padding" 144 android:layout_marginBottom="@dimen/quickcontact_expanding_button_section_padding" 145 android:orientation="horizontal"> 146 147 <Button 148 android:id="@+id/cancel_button" 149 style="?android:attr/buttonBarButtonStyle" 150 android:layout_width="wrap_content" 151 android:layout_height="wrap_content" 152 android:text="@string/quickcontact_suggestion_cancel_button"/> 153 154 <Button 155 android:id="@+id/link_button" 156 android:layout_width="wrap_content" 157 android:layout_height="wrap_content" 158 android:lines="1" 159 android:ellipsize="end" 160 android:text="@string/quickcontact_suggestion_link_button"/> 161 </LinearLayout> 162 </LinearLayout> 163</androidx.cardview.widget.CardView>