Home | History | Annotate | Download | only in layout-sw580dp
      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/com.android.contacts"
     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.widget.ProportionalLayout"
     33         android:layout_width="match_parent"
     34         android:layout_height="match_parent"
     35         ex:ratio="0.66"
     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             <ImageView
     44                 android:id="@+id/photo"
     45                 android:scaleType="centerCrop"
     46                 android:layout_width="0dip"
     47                 android:layout_height="match_parent"
     48                 android:layout_weight="2" />
     49 
     50             <!-- Empty view to fill the rest of the LinearLayout, so that a weight on its sibling
     51             ImageView will work.-->
     52             <View
     53                 android:layout_width="0dip"
     54                 android:layout_weight="1"
     55                 android:layout_height="match_parent" />
     56 
     57         </LinearLayout>
     58 
     59     </view>
     60 
     61     <LinearLayout
     62         android:layout_width="match_parent"
     63         android:layout_height="wrap_content"
     64         android:orientation="horizontal"
     65         android:paddingTop="8dip"
     66         android:paddingRight="8dip">
     67 
     68         <TextView
     69             android:id="@+id/name"
     70             android:layout_width="0dip"
     71             android:layout_height="wrap_content"
     72             android:layout_weight="1"
     73             android:paddingLeft="8dip"
     74             android:paddingRight="24dip"
     75             android:textAppearance="?android:attr/textAppearanceLarge"
     76             android:textSize="@dimen/detail_header_name_text_size" />
     77 
     78         <include
     79             layout="@layout/favorites_star" />
     80 
     81     </LinearLayout>
     82 
     83     <TextView
     84         android:id="@+id/company"
     85         android:layout_width="match_parent"
     86         android:layout_height="wrap_content"
     87         android:paddingLeft="8dip"
     88         android:textAppearance="?android:attr/textAppearanceMedium"
     89         android:textColor="?android:attr/textColorSecondary" />
     90 
     91 </LinearLayout>
     92