Home | History | Annotate | Download | only in layout
      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 <view
     17     xmlns:android="http://schemas.android.com/apk/res/android"
     18     android:paddingBottom="1dip"
     19     android:paddingRight="1dip"
     20     android:paddingEnd="1dip"
     21     android:id="@+id/contact_tile"
     22     class="com.android.dialer.list.PhoneFavoriteSquareTileView" >
     23 
     24     <RelativeLayout
     25         android:id="@+id/contact_favorite_card"
     26         android:layout_width="match_parent"
     27         android:layout_height="match_parent"
     28         android:focusable="true">
     29 
     30         <com.android.contacts.common.widget.LayoutSuppressingImageView
     31             android:id="@+id/contact_tile_image"
     32             android:layout_width="match_parent"
     33             android:layout_height="match_parent"
     34             android:scaleType="centerCrop" />
     35 
     36         <View
     37             android:id="@+id/shadow_overlay"
     38             android:layout_width="match_parent"
     39             android:layout_height="match_parent"
     40             android:background="@drawable/shadow_contact_photo"/>
     41 
     42         <LinearLayout
     43             android:layout_width="match_parent"
     44             android:layout_height="wrap_content"
     45             android:paddingLeft="8dp"
     46             android:paddingRight="@dimen/contact_tile_info_button_height_and_width"
     47             android:paddingStart="8dp"
     48             android:paddingEnd="@dimen/contact_tile_info_button_height_and_width"
     49             android:paddingBottom="4dp"
     50             android:layout_alignParentBottom="true"
     51             android:orientation="vertical" >
     52             <TextView
     53                 android:id="@+id/contact_tile_name"
     54                 android:layout_width="match_parent"
     55                 android:layout_height="wrap_content"
     56                 android:gravity="center_vertical"
     57                 android:textColor="@color/contact_tile_name_color"
     58                 android:fontFamily="sans-serif-light"
     59                 android:singleLine="true"
     60                 android:textSize="16sp"
     61                 android:fadingEdge="horizontal"
     62                 android:fadingEdgeLength="3dip"
     63                 android:ellipsize="marquee"
     64                 android:textAlignment="viewStart" />
     65             <TextView
     66                 android:id="@+id/contact_tile_phone_type"
     67                 android:layout_width="match_parent"
     68                 android:layout_height="wrap_content"
     69                 android:gravity="center_vertical"
     70                 android:textColor="@color/contact_tile_name_color"
     71                 android:fontFamily="sans-serif-light"
     72                 android:singleLine="true"
     73                 android:textSize="12sp"
     74                 android:paddingBottom="2dp"
     75                 android:fadingEdge="horizontal"
     76                 android:fadingEdgeLength="3dip"
     77                 android:ellipsize="marquee"
     78                 android:textAlignment="viewStart" />
     79         </LinearLayout>
     80         <View
     81             android:id="@+id/contact_tile_push_state"
     82             android:layout_width="match_parent"
     83             android:layout_height="match_parent"
     84             android:focusable="true"
     85             android:nextFocusRight="@+id/contact_tile_secondary_button"
     86             android:background="?android:attr/selectableItemBackground" />
     87 
     88         <ImageView
     89             android:id="@+id/contact_favorite_star"
     90             android:background="?android:attr/selectableItemBackground"
     91             android:layout_height="@dimen/contact_tile_info_button_height_and_width"
     92             android:layout_width="@dimen/contact_tile_info_button_height_and_width"
     93             android:paddingLeft="8dp"
     94             android:paddingRight="8dp"
     95             android:paddingStart="8dp"
     96             android:paddingEnd="8dp"
     97             android:paddingTop="8dp"
     98             android:paddingBottom="8dp"
     99             android:layout_alignParentBottom="true"
    100             android:layout_alignParentRight="true"
    101             android:layout_alignParentEnd="true"
    102             android:src="@drawable/ic_star_marked_as_fav"
    103             android:scaleType="center"
    104             android:visibility="gone" />
    105 
    106 
    107         <ImageButton
    108             android:id="@id/contact_tile_secondary_button"
    109             android:src="@drawable/ic_contact_info"
    110             android:background="?android:attr/selectableItemBackground"
    111             android:layout_height="@dimen/contact_tile_info_button_height_and_width"
    112             android:layout_width="@dimen/contact_tile_info_button_height_and_width"
    113             android:paddingLeft="8dp"
    114             android:paddingRight="8dp"
    115             android:paddingStart="8dp"
    116             android:paddingEnd="8dp"
    117             android:paddingTop="8dp"
    118             android:paddingBottom="8dp"
    119             android:layout_alignParentBottom="true"
    120             android:layout_alignParentRight="true"
    121             android:layout_alignParentEnd="true"
    122             android:contentDescription="@string/description_view_contact_detail" />
    123 
    124     </RelativeLayout>
    125 
    126     <LinearLayout
    127         android:id="@+id/favorite_remove_dialogue"
    128         android:orientation="vertical"
    129         android:layout_width="match_parent"
    130         android:layout_height="match_parent"
    131         android:layout_alignParentLeft="true"
    132         android:layout_alignParentStart="true"
    133         android:gravity="center_horizontal"
    134         android:background="@color/background_dialer_light"
    135         android:alpha="0.0"
    136         android:visibility="gone">
    137 
    138         <TextView
    139             android:id="@+id/favorite_remove_dialogue_text"
    140             android:layout_width="match_parent"
    141             android:layout_height="wrap_content"
    142             android:text="@string/favorite_hidden"
    143             android:ellipsize="marquee"
    144             android:fontFamily="sans-serif"
    145             android:textSize="14sp"
    146             android:textColor="@color/undo_dialogue_text_color"
    147             android:lines="2"
    148             android:paddingTop="22dp"
    149             android:textDirection="ltr"
    150             android:textAlignment="center" />
    151 
    152         <LinearLayout
    153             android:id="@+id/favorite_remove_undo_button"
    154             android:orientation="vertical"
    155             android:layout_width="match_parent"
    156             android:layout_height="match_parent"
    157             android:layout_alignParentLeft="true"
    158             android:background="?android:attr/selectableItemBackground"
    159             android:clickable="true"
    160             android:layout_weight="1"
    161             android:layout_gravity="bottom">
    162 
    163             <ImageView
    164                 android:layout_width="match_parent"
    165                 android:layout_height="wrap_content"
    166                 android:src="@drawable/ic_fav_undo_dk"/>
    167 
    168             <TextView
    169                 android:layout_width="match_parent"
    170                 android:layout_height="wrap_content"
    171                 android:fontFamily="sans-serif-light"
    172                 android:textSize="13sp"
    173                 android:ellipsize="marquee"
    174                 android:singleLine="true"
    175                 android:text="@string/favorite_hidden_undo"
    176                 android:textColor="@color/undo_dialogue_text_color"
    177                 android:textAlignment="center"/>
    178         </LinearLayout>
    179 
    180     </LinearLayout>
    181 </view>
    182