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
     18     xmlns:android="http://schemas.android.com/apk/res/android"
     19     class="com.android.dialer.calllog.CallLogListItemView"
     20     android:layout_width="match_parent"
     21     android:layout_height="wrap_content"
     22     android:id="@+id/call_log_list_item"
     23     android:orientation="vertical"
     24     android:background="@drawable/bottom_border_background"
     25 >
     26     <!--
     27         This layout may represent either a call log item or one of the
     28         headers in the call log.
     29 
     30         The former will make the @id/call_log_item visible and the
     31         @id/call_log_header gone.
     32 
     33         The latter will make the @id/call_log_header visible and the
     34         @id/call_log_item gone
     35     -->
     36 
     37         <LinearLayout
     38             android:id="@+id/primary_action_view"
     39             android:layout_width="match_parent"
     40             android:layout_height="wrap_content"
     41             android:layout_centerVertical="true"
     42             android:paddingStart="@dimen/call_log_outer_margin"
     43             android:paddingEnd="@dimen/call_log_outer_margin"
     44             android:orientation="horizontal"
     45             android:gravity="center_vertical"
     46             android:background="?android:attr/selectableItemBackground"
     47             android:focusable="true"
     48             android:nextFocusRight="@+id/secondary_action_icon"
     49             android:nextFocusLeft="@+id/quick_contact_photo"
     50         >
     51             <QuickContactBadge
     52                 android:id="@+id/quick_contact_photo"
     53                 android:layout_width="@dimen/call_log_list_contact_photo_size"
     54                 android:layout_height="@dimen/call_log_list_contact_photo_size"
     55                 android:nextFocusRight="@id/primary_action_view"
     56                 android:layout_alignParentStart="true"
     57                 android:focusable="true"
     58             />
     59             <LinearLayout
     60                 android:layout_width="0dp"
     61                 android:layout_height="wrap_content"
     62                 android:layout_weight="1"
     63                 android:paddingTop="@dimen/call_log_inner_margin"
     64                 android:paddingBottom="@dimen/call_log_inner_margin"
     65                 android:orientation="vertical"
     66                 android:gravity="center_vertical"
     67                 android:layout_marginStart="@dimen/call_log_inner_margin"
     68             >
     69                 <TextView
     70                     android:id="@+id/name"
     71                     android:layout_width="wrap_content"
     72                     android:layout_height="wrap_content"
     73                     android:layout_marginEnd="@dimen/call_log_icon_margin"
     74                     android:textColor="?attr/call_log_primary_text_color"
     75                     android:textSize="18sp"
     76                     android:singleLine="true"
     77                 />
     78                 <LinearLayout
     79                     android:layout_width="wrap_content"
     80                     android:layout_height="wrap_content"
     81                     android:orientation="horizontal"
     82                 >
     83                     <TextView
     84                         android:id="@+id/label"
     85                         android:layout_width="wrap_content"
     86                         android:layout_height="wrap_content"
     87                         android:layout_marginEnd="@dimen/call_log_icon_margin"
     88                         android:textColor="?attr/call_log_secondary_text_color"
     89                         android:textStyle="bold"
     90                         android:textSize="14sp"
     91                         android:singleLine="true"
     92                         android:ellipsize="marquee"
     93                         />
     94                     </LinearLayout>
     95                 <LinearLayout
     96                     android:id="@+id/call_type"
     97                     android:layout_width="wrap_content"
     98                     android:layout_height="wrap_content"
     99                     android:orientation="horizontal"
    100                 >
    101                     <view
    102                         class="com.android.dialer.calllog.CallTypeIconsView"
    103                         android:id="@+id/call_type_icons"
    104                         android:layout_width="wrap_content"
    105                         android:layout_height="wrap_content"
    106                         android:layout_marginEnd="@dimen/call_log_icon_margin"
    107                         android:layout_gravity="center_vertical"
    108                     />
    109                     <TextView
    110                         android:id="@+id/call_count_and_date"
    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                         android:textColor="?attr/call_log_secondary_text_color"
    116                         android:textSize="14sp"
    117                         android:singleLine="true"
    118                     />
    119                 </LinearLayout>
    120             </LinearLayout>
    121             <ImageButton
    122                 android:id="@+id/secondary_action_icon"
    123                 android:layout_width="@dimen/call_log_call_action_width"
    124                 android:layout_height="match_parent"
    125                 android:paddingStart="@dimen/call_log_inner_margin"
    126                 android:paddingTop="@dimen/call_log_inner_margin"
    127                 android:paddingBottom="@dimen/call_log_inner_margin"
    128                 android:paddingEnd="@dimen/call_log_inner_margin"
    129                 android:scaleType="center"
    130                 android:background="?android:attr/selectableItemBackground"
    131                 android:nextFocusLeft="@id/primary_action_view"
    132             />
    133         </LinearLayout>
    134 
    135     <TextView
    136         android:id="@+id/call_log_header"
    137         style="@style/ContactListSeparatorTextViewStyle"
    138         android:layout_marginStart="@dimen/call_log_outer_margin"
    139         android:layout_marginEnd="@dimen/call_log_outer_margin"
    140         android:paddingTop="@dimen/call_log_inner_margin"
    141         android:paddingBottom="@dimen/call_log_inner_margin" />
    142 
    143     <!-- Displays the extra link section -->
    144     <ViewStub android:id="@+id/link_stub"
    145               android:layout="@layout/call_log_list_item_extra"
    146               android:layout_width="match_parent"
    147               android:layout_height="wrap_content"/>
    148 
    149 </view>
    150