Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2007 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 xmlns:android="http://schemas.android.com/apk/res/android"
     18     class="com.android.dialer.calllog.CallLogListItemView"
     19     android:id="@+id/call_log_list_item"
     20     android:layout_width="match_parent"
     21     android:layout_height="wrap_content"
     22     android:orientation="vertical">
     23 
     24     <!-- Day group heading. Used to show a "today", "yesterday", "last week" or "other" heading
     25          above a group of call log entries. -->
     26     <TextView
     27         android:id="@+id/call_log_day_group_label"
     28         android:layout_width="wrap_content"
     29         android:layout_height="wrap_content"
     30         android:layout_gravity="start"
     31         android:layout_marginStart="@dimen/call_log_start_margin"
     32         android:layout_marginEnd="@dimen/call_log_outer_margin"
     33         android:fontFamily="sans-serif-medium"
     34         android:textColor="?attr/call_log_secondary_text_color"
     35         android:textSize="@dimen/call_log_secondary_text_size"
     36         android:paddingTop="@dimen/call_log_day_group_padding_top"
     37         android:paddingBottom="@dimen/call_log_day_group_padding_bottom" />
     38 
     39     <!-- Linear layout to separate the primary area containing the contact badge and caller
     40          information and the secondary action (call details / play voicemail). -->
     41     <LinearLayout
     42         android:id="@+id/call_log_row"
     43         android:layout_width="match_parent"
     44         android:layout_height="wrap_content"
     45         android:baselineAligned="false"
     46         android:orientation="vertical"
     47         android:gravity="center_vertical" >
     48 
     49         <!-- Primary area containing the contact badge and caller information -->
     50         <LinearLayout
     51             android:id="@+id/primary_action_view"
     52             android:background="@drawable/call_log_background"
     53             android:layout_width="match_parent"
     54             android:layout_height="wrap_content"
     55             android:paddingStart="@dimen/call_log_start_margin"
     56             android:paddingEnd="@dimen/call_log_outer_margin"
     57             android:paddingTop="@dimen/call_log_outer_margin"
     58             android:paddingBottom="@dimen/call_log_outer_margin"
     59             android:orientation="horizontal"
     60             android:gravity="center_vertical"
     61             android:focusable="true"
     62             android:nextFocusRight="@+id/call_back_action"
     63             android:nextFocusLeft="@+id/quick_contact_photo" >
     64             <QuickContactBadge
     65                 android:id="@+id/quick_contact_photo"
     66                 android:layout_width="@dimen/contact_photo_size"
     67                 android:layout_height="@dimen/contact_photo_size"
     68                 android:paddingTop="2dp"
     69                 android:nextFocusRight="@id/primary_action_view"
     70                 android:layout_gravity="top"
     71                 android:focusable="true"
     72                 />
     73             <LinearLayout
     74                 android:layout_width="0dp"
     75                 android:layout_height="wrap_content"
     76                 android:layout_weight="1"
     77                 android:orientation="vertical"
     78                 android:gravity="center_vertical"
     79                 android:layout_marginStart="@dimen/call_log_start_margin"
     80                 >
     81                 <TextView
     82                     android:id="@+id/name"
     83                     android:layout_width="wrap_content"
     84                     android:layout_height="wrap_content"
     85                     android:layout_marginBottom="@dimen/call_log_name_margin_bottom"
     86                     android:layout_marginEnd="@dimen/call_log_icon_margin"
     87                     android:textColor="?attr/call_log_primary_text_color"
     88                     android:textSize="@dimen/call_log_primary_text_size"
     89                     android:singleLine="true"
     90                     />
     91                 <TextView
     92                     android:id="@+id/voicemail_transcription"
     93                     android:layout_width="wrap_content"
     94                     android:layout_height="wrap_content"
     95                     android:layout_marginEnd="@dimen/call_log_icon_margin"
     96                     android:textColor="?attr/call_log_secondary_text_color"
     97                     android:textSize="@dimen/call_log_secondary_text_size"
     98                     android:singleLine="true"
     99                     android:ellipsize="marquee"
    100                     android:visibility="gone"
    101                     />
    102                 <LinearLayout
    103                     android:id="@+id/call_type"
    104                     android:layout_width="wrap_content"
    105                     android:layout_height="wrap_content"
    106                     android:orientation="horizontal"
    107                     >
    108                     <view
    109                         class="com.android.dialer.calllog.CallTypeIconsView"
    110                         android:id="@+id/call_type_icons"
    111                         android:layout_width="wrap_content"
    112                         android:layout_height="wrap_content"
    113                         android:layout_marginEnd="@dimen/call_log_icon_margin"
    114                         android:layout_gravity="center_vertical"
    115                         />
    116                     <ImageView
    117                         android:id="@+id/call_account_icon"
    118                         android:layout_width="@dimen/call_provider_small_icon_size"
    119                         android:layout_height="@dimen/call_provider_small_icon_size"
    120                         android:layout_marginEnd="@dimen/call_log_icon_margin"
    121                         android:layout_gravity="center_vertical"
    122                         android:tint="?attr/call_log_secondary_text_color"
    123                         android:scaleType="centerInside"
    124                         />
    125                     <TextView
    126                         android:id="@+id/call_location_and_date"
    127                         android:layout_width="wrap_content"
    128                         android:layout_height="wrap_content"
    129                         android:layout_marginEnd="@dimen/call_log_icon_margin"
    130                         android:layout_gravity="center_vertical"
    131                         android:textColor="?attr/call_log_secondary_text_color"
    132                         android:textSize="@dimen/call_log_secondary_text_size"
    133                         android:singleLine="true"
    134                         />
    135                 </LinearLayout>
    136             </LinearLayout>
    137             <ImageView
    138                 android:id="@+id/call_indicator_icon"
    139                 android:layout_width="wrap_content"
    140                 android:layout_height="wrap_content"
    141                 android:layout_gravity="center_vertical"
    142                 android:layout_marginEnd="@dimen/call_log_icon_margin"
    143                 android:src="@drawable/ic_card_phone"
    144                 android:tint="@color/recent_call_log_item_phone_icon_tint"
    145                 android:alpha="0.3"
    146                 android:importantForAccessibility="no"
    147                 android:visibility="gone"
    148                 />
    149         </LinearLayout>
    150 
    151         <!-- Viewstub with additional expandable actions for a call log entry -->
    152         <ViewStub android:id="@+id/call_log_entry_actions_stub"
    153                   android:inflatedId="@+id/call_log_entry_actions"
    154                   android:layout="@layout/call_log_list_item_actions"
    155                   android:layout_width="match_parent"
    156                   android:layout_height="wrap_content"/>
    157     </LinearLayout>
    158     <!-- Displays the extra link section -->
    159     <ViewStub android:id="@+id/link_stub"
    160               android:layout="@layout/call_log_list_item_extra"
    161               android:layout_width="match_parent"
    162               android:layout_height="wrap_content"/>
    163 </view>
    164