1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2011 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 This is a header entry in the contact details list for when the contact does not have social 19 updates, which means that the contact's photo and basic info will scroll with the list of details. 20 --> 21 <LinearLayout 22 xmlns:android="http://schemas.android.com/apk/res/android" 23 xmlns:ex="http://schemas.android.com/apk/res-auto" 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content" 26 android:orientation="vertical" 27 android:paddingBottom="16dip"> 28 29 <!-- Ensure that the contact photo for a contact WITHOUT social updates is the same width and 30 height as a contact WITH social updates (where the photo is 2/3 of the screen width). --> 31 <view 32 class="com.android.contacts.common.widget.ProportionalLayout" 33 android:layout_width="match_parent" 34 android:layout_height="match_parent" 35 ex:ratio="0.6667" 36 ex:direction="widthToHeight"> 37 38 <LinearLayout 39 android:layout_width="match_parent" 40 android:layout_height="match_parent" 41 android:orientation="horizontal"> 42 43 <include layout="@layout/photo_selector_view" 44 android:layout_width="0dip" 45 android:layout_height="match_parent" 46 android:layout_weight="2" /> 47 48 <!-- Empty view to fill the rest of the LinearLayout, so that a weight on its sibling 49 ImageView will work.--> 50 <View 51 android:layout_width="0dip" 52 android:layout_weight="1" 53 android:layout_height="match_parent" /> 54 55 </LinearLayout> 56 57 </view> 58 59 <LinearLayout 60 android:layout_width="match_parent" 61 android:layout_height="wrap_content" 62 android:orientation="horizontal" 63 android:paddingTop="8dip" 64 android:paddingEnd="8dip" > 65 66 <TextView 67 android:id="@+id/name" 68 android:layout_width="0dip" 69 android:layout_height="wrap_content" 70 android:layout_weight="1" 71 android:paddingStart="8dip" 72 android:paddingEnd="24dip" 73 android:textAppearance="?android:attr/textAppearanceLarge" 74 android:textSize="@dimen/detail_header_name_text_size" /> 75 76 <include 77 layout="@layout/favorites_star" /> 78 79 </LinearLayout> 80 81 <TextView 82 android:id="@+id/company" 83 android:layout_width="match_parent" 84 android:layout_height="wrap_content" 85 android:paddingStart="8dip" 86 android:textAppearance="?android:attr/textAppearanceMedium" 87 android:textColor="?android:attr/textColorSecondary" /> 88 89 </LinearLayout> 90