1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2017 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 <!-- This FrameLayout is used to center the inner layout. --> 17 <FrameLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 android:layout_width="match_parent" 20 android:layout_height="wrap_content" 21 android:layout_marginBottom="@dimen/call_log_card_overlap" 22 android:focusable="true"> 23 24 <!-- Wraps everything in a card --> 25 <com.android.car.stream.ui.StreamCardView 26 android:id="@+id/card" 27 android:layout_width="wrap_content" 28 android:layout_height="wrap_content" 29 android:backgroundTint="@color/car_grey_200" 30 android:backgroundTintMode="multiply" 31 android:layout_gravity="center"> 32 33 <!-- Used to provide common margins and also allow for the textview to set its right margin 34 to the width of the image to allow it to ellipsize. 35 --> 36 <FrameLayout 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:layout_marginLeft="@dimen/stream_card_keyline_1" 40 android:layout_marginRight="@dimen/stream_card_keyline_1" 41 android:layout_marginTop="@dimen/contact_detail_vertical_margin" 42 android:layout_marginBottom="@dimen/contact_detail_vertical_margin"> 43 44 <TextView 45 android:id="@+id/title" 46 android:layout_width="wrap_content" 47 android:layout_height="wrap_content" 48 android:layout_gravity="bottom|left" 49 android:layout_marginRight="@dimen/contact_detail_image_size" 50 android:singleLine="true" 51 android:ellipsize="end" 52 style="@style/CarHeadline1" /> 53 54 <ImageView 55 android:id="@+id/right_icon" 56 android:layout_width="@dimen/contact_detail_image_size" 57 android:layout_height="@dimen/contact_detail_image_size" 58 android:background="@drawable/avatar_rounded_bg" 59 android:layout_gravity="right" /> 60 </FrameLayout> 61 </com.android.car.stream.ui.StreamCardView> 62 </FrameLayout> 63