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         android:background="@drawable/ic_contacts_tiles">
     30 
     31         <com.android.contacts.common.widget.LayoutSuppressingImageView
     32             android:id="@+id/contact_tile_image"
     33             android:layout_width="match_parent"
     34             android:layout_height="match_parent"
     35             android:scaleType="centerCrop" />
     36 
     37         <View
     38             android:id="@+id/shadow_overlay"
     39             android:layout_width="match_parent"
     40             android:layout_height="match_parent"
     41             android:background="@drawable/shadow_contact_photo"/>
     42 
     43         <LinearLayout
     44             android:layout_width="match_parent"
     45             android:layout_height="wrap_content"
     46             android:paddingLeft="@dimen/contact_tile_text_side_padding"
     47             android:paddingRight="@dimen/contact_tile_text_side_padding"
     48             android:paddingStart="@dimen/contact_tile_text_side_padding"
     49             android:paddingEnd="@dimen/contact_tile_text_side_padding"
     50             android:paddingBottom="@dimen/contact_tile_text_bottom_padding"
     51             android:layout_alignParentBottom="true"
     52             android:orientation="vertical" >
     53             <TextView
     54                 android:id="@+id/contact_tile_name"
     55                 android:layout_width="match_parent"
     56                 android:layout_height="wrap_content"
     57                 android:gravity="center_vertical"
     58                 android:textColor="@color/contact_tile_name_color"
     59                 android:fontFamily="sans-serif"
     60                 android:singleLine="true"
     61                 android:textSize="15sp"
     62                 android:fadingEdge="horizontal"
     63                 android:fadingEdgeLength="3dip"
     64                 android:ellipsize="marquee"
     65                 android:textAlignment="viewStart" />
     66             <TextView
     67                 android:id="@+id/contact_tile_phone_type"
     68                 android:layout_width="match_parent"
     69                 android:layout_height="wrap_content"
     70                 android:gravity="center_vertical"
     71                 android:textColor="@color/contact_tile_name_color"
     72                 android:fontFamily="sans-serif"
     73                 android:singleLine="true"
     74                 android:textSize="11sp"
     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         <ImageButton
     89             android:id="@id/contact_tile_secondary_button"
     90             android:src="@drawable/overflow_thumbnail"
     91             android:background="?android:attr/selectableItemBackground"
     92             android:layout_height="@dimen/contact_tile_info_button_height_and_width"
     93             android:layout_width="@dimen/contact_tile_info_button_height_and_width"
     94             android:paddingLeft="4dp"
     95             android:paddingRight="4dp"
     96             android:paddingStart="4dp"
     97             android:paddingEnd="4dp"
     98             android:paddingTop="4dp"
     99             android:paddingBottom="4dp"
    100             android:layout_alignParentTop="true"
    101             android:layout_alignParentRight="true"
    102             android:layout_alignParentEnd="true"
    103             android:scaleType="center"
    104             android:contentDescription="@string/description_view_contact_detail" />
    105 
    106     </RelativeLayout>
    107 
    108     <LinearLayout
    109         android:id="@+id/favorite_remove_dialogue"
    110         android:orientation="vertical"
    111         android:layout_width="match_parent"
    112         android:layout_height="match_parent"
    113         android:layout_alignParentLeft="true"
    114         android:layout_alignParentStart="true"
    115         android:gravity="center_horizontal"
    116         android:background="@color/background_dialer_light"
    117         android:alpha="0.0"
    118         android:visibility="gone">
    119 
    120         <TextView
    121             android:id="@+id/favorite_remove_dialogue_text"
    122             android:layout_width="match_parent"
    123             android:layout_height="wrap_content"
    124             android:text="@string/favorite_hidden"
    125             android:ellipsize="marquee"
    126             android:fontFamily="sans-serif"
    127             android:textSize="14sp"
    128             android:textColor="@color/undo_dialogue_text_color"
    129             android:lines="2"
    130             android:paddingTop="22dp"
    131             android:textDirection="ltr"
    132             android:textAlignment="center" />
    133 
    134         <LinearLayout
    135             android:id="@+id/favorite_remove_undo_button"
    136             android:orientation="vertical"
    137             android:layout_width="match_parent"
    138             android:layout_height="match_parent"
    139             android:layout_alignParentLeft="true"
    140             android:background="?android:attr/selectableItemBackground"
    141             android:clickable="true"
    142             android:layout_weight="1"
    143             android:layout_gravity="bottom">
    144 
    145             <ImageView
    146                 android:layout_width="match_parent"
    147                 android:layout_height="wrap_content"
    148                 android:src="@drawable/ic_fav_undo_dk"/>
    149 
    150             <TextView
    151                 android:layout_width="match_parent"
    152                 android:layout_height="wrap_content"
    153                 android:fontFamily="sans-serif"
    154                 android:textSize="13sp"
    155                 android:ellipsize="marquee"
    156                 android:singleLine="true"
    157                 android:text="@string/favorite_hidden_undo"
    158                 android:textColor="@color/undo_dialogue_text_color"
    159                 android:textAlignment="center"/>
    160         </LinearLayout>
    161 
    162     </LinearLayout>
    163 </view>
    164