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:padding="@dimen/call_log_outer_margin"
     43             android:orientation="horizontal"
     44             android:gravity="center_vertical"
     45             android:background="?android:attr/selectableItemBackground"
     46             android:focusable="true"
     47             android:nextFocusRight="@+id/secondary_action_icon"
     48             android:nextFocusLeft="@+id/quick_contact_photo"
     49         >
     50             <QuickContactBadge
     51                 android:id="@+id/quick_contact_photo"
     52                 android:layout_width="@dimen/call_log_list_contact_photo_size"
     53                 android:layout_height="@dimen/call_log_list_contact_photo_size"
     54                 android:nextFocusRight="@id/primary_action_view"
     55                 android:layout_alignParentStart="true"
     56                 android:focusable="true"
     57             />
     58             <LinearLayout
     59                 android:layout_width="0dp"
     60                 android:layout_height="wrap_content"
     61                 android:layout_weight="1"
     62                 android:orientation="vertical"
     63                 android:gravity="center_vertical"
     64                 android:layout_marginStart="@dimen/call_log_inner_margin"
     65             >
     66                 <TextView
     67                     android:id="@+id/name"
     68                     android:layout_width="wrap_content"
     69                     android:layout_height="wrap_content"
     70                     android:layout_marginEnd="@dimen/call_log_icon_margin"
     71                     android:textColor="?attr/call_log_primary_text_color"
     72                     android:textSize="16sp"
     73                     android:singleLine="true"
     74                 />
     75                 <LinearLayout
     76                     android:layout_width="wrap_content"
     77                     android:layout_height="wrap_content"
     78                     android:orientation="horizontal"
     79                 >
     80                     <TextView
     81                         android:id="@+id/label"
     82                         android:layout_width="wrap_content"
     83                         android:layout_height="wrap_content"
     84                         android:layout_marginEnd="@dimen/call_log_icon_margin"
     85                         android:textColor="?attr/call_log_secondary_text_color"
     86                         android:textSize="12sp"
     87                         android:singleLine="true"
     88                         android:ellipsize="marquee"
     89                         />
     90                     </LinearLayout>
     91                 <LinearLayout
     92                     android:id="@+id/call_type"
     93                     android:layout_width="wrap_content"
     94                     android:layout_height="wrap_content"
     95                     android:orientation="horizontal"
     96                 >
     97                     <view
     98                         class="com.android.dialer.calllog.CallTypeIconsView"
     99                         android:id="@+id/call_type_icons"
    100                         android:layout_width="wrap_content"
    101                         android:layout_height="wrap_content"
    102                         android:layout_marginEnd="@dimen/call_log_icon_margin"
    103                         android:layout_gravity="center_vertical"
    104                     />
    105                     <TextView
    106                         android:id="@+id/call_count_and_date"
    107                         android:layout_width="wrap_content"
    108                         android:layout_height="wrap_content"
    109                         android:layout_marginEnd="@dimen/call_log_icon_margin"
    110                         android:layout_gravity="center_vertical"
    111                         android:textColor="?attr/call_log_secondary_text_color"
    112                         android:textSize="12sp"
    113                         android:singleLine="true"
    114                     />
    115                 </LinearLayout>
    116             </LinearLayout>
    117             <ImageButton
    118                 android:id="@+id/secondary_action_icon"
    119                 android:layout_width="@dimen/call_log_call_action_width"
    120                 android:layout_height="match_parent"
    121                 android:paddingStart="@dimen/call_log_inner_margin"
    122                 android:paddingTop="@dimen/call_log_inner_margin"
    123                 android:paddingBottom="@dimen/call_log_inner_margin"
    124                 android:paddingEnd="@dimen/call_log_inner_margin"
    125                 android:scaleType="center"
    126                 android:background="?android:attr/selectableItemBackground"
    127                 android:nextFocusLeft="@id/primary_action_view"
    128             />
    129         </LinearLayout>
    130 
    131     <TextView
    132         android:id="@+id/call_log_header"
    133         style="@style/ContactListSeparatorTextViewStyle"
    134         android:layout_marginStart="@dimen/call_log_outer_margin"
    135         android:layout_marginEnd="@dimen/call_log_outer_margin"
    136         android:paddingTop="@dimen/call_log_inner_margin"
    137         android:paddingBottom="@dimen/call_log_inner_margin" />
    138 
    139     <!-- Displays the extra link section -->
    140     <ViewStub android:id="@+id/link_stub"
    141               android:layout="@layout/call_log_list_item_extra"
    142               android:layout_width="match_parent"
    143               android:layout_height="wrap_content"/>
    144 
    145 </view>
    146