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 <view 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 class="com.android.contacts.detail.CarouselTab" 20 android:layout_width="0dip" 21 android:layout_height="match_parent" 22 android:layout_weight="1"> 23 24 <RelativeLayout 25 android:layout_width="match_parent" 26 android:layout_height="match_parent" > 27 28 <ImageView android:id="@+id/photo" 29 android:scaleType="centerCrop" 30 android:layout_width="match_parent" 31 android:layout_height="match_parent" 32 android:layout_alignParentTop="true" 33 android:layout_alignParentLeft="true"/> 34 35 <View android:id="@+id/photo_overlay" 36 android:background="?android:attr/selectableItemBackground" 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:layout_alignParentTop="true" 40 android:layout_alignParentLeft="true"/> 41 42 <!-- Transparent view to overlay on the contact's photo 43 (to allow white text to appear over a white photo). --> 44 <View android:id="@+id/label_background" 45 android:layout_width="match_parent" 46 android:layout_height="@dimen/detail_tab_carousel_tab_label_height" 47 android:layout_alignParentLeft="true" 48 android:layout_alignParentBottom="true" 49 android:background="#7F000000" /> 50 51 <View 52 android:id="@+id/alpha_overlay" 53 android:layout_width="match_parent" 54 android:layout_height="match_parent" 55 android:layout_alignParentLeft="true" 56 android:layout_alignParentTop="true" 57 android:layout_marginBottom="@dimen/detail_tab_carousel_tab_label_height"/> 58 59 <TextView 60 android:id="@+id/label" 61 android:layout_width="match_parent" 62 android:layout_height="@dimen/detail_tab_carousel_tab_label_height" 63 android:layout_alignParentLeft="true" 64 android:layout_alignParentBottom="true" 65 android:paddingLeft="@dimen/detail_tab_carousel_tab_label_indent" 66 android:singleLine="true" 67 android:gravity="left|center_vertical" 68 android:textAppearance="?android:attr/textAppearanceMedium" 69 android:textColor="@color/detail_tab_carousel_tab_label_color" 70 style="@android:style/Widget.Holo.ActionBar.TabView" /> 71 72 </RelativeLayout> 73 74 </view> 75