Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 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" |
Chiao Cheng | 704acc0 | 2013-09-09 18:34:41 -0700 | [diff] [blame] | 22 | android:id="@+id/call_log_list_item" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 23 | android:orientation="vertical" |
Yorke Lee | fb58507 | 2013-08-04 14:58:55 -0700 | [diff] [blame] | 24 | android:background="@drawable/bottom_border_background" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 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 | |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 37 | <!-- Linear layout to separate the primary area containing the contact badge and caller |
| 38 | information and the secondary action (call details / play voicemail). --> |
| 39 | <LinearLayout |
| 40 | android:layout_width="match_parent" |
| 41 | android:layout_height="wrap_content" |
| 42 | android:orientation="horizontal" |
| 43 | android:gravity="center_vertical" |
| 44 | > |
| 45 | |
| 46 | <!-- Primary area containing the contact badge and caller information --> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 47 | <LinearLayout |
| 48 | android:id="@+id/primary_action_view" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 49 | android:layout_width="0dp" |
| 50 | android:layout_weight="1" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 51 | android:layout_height="wrap_content" |
| 52 | android:layout_centerVertical="true" |
Yorke Lee | b372f3e | 2013-11-14 11:45:13 -0800 | [diff] [blame] | 53 | android:padding="@dimen/call_log_outer_margin" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 54 | android:orientation="horizontal" |
| 55 | android:gravity="center_vertical" |
| 56 | android:background="?android:attr/selectableItemBackground" |
| 57 | android:focusable="true" |
| 58 | android:nextFocusRight="@+id/secondary_action_icon" |
| 59 | android:nextFocusLeft="@+id/quick_contact_photo" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 60 | > |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 61 | <QuickContactBadge |
| 62 | android:id="@+id/quick_contact_photo" |
| 63 | android:layout_width="@dimen/call_log_list_contact_photo_size" |
| 64 | android:layout_height="@dimen/call_log_list_contact_photo_size" |
| 65 | android:nextFocusRight="@id/primary_action_view" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 66 | android:layout_alignParentStart="true" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 67 | android:focusable="true" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 68 | /> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 69 | <LinearLayout |
Yorke Lee | fb58507 | 2013-08-04 14:58:55 -0700 | [diff] [blame] | 70 | android:layout_width="0dp" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 71 | android:layout_height="wrap_content" |
| 72 | android:layout_weight="1" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 73 | android:orientation="vertical" |
| 74 | android:gravity="center_vertical" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 75 | android:layout_marginStart="@dimen/call_log_inner_margin" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 76 | > |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 77 | <TextView |
| 78 | android:id="@+id/name" |
| 79 | android:layout_width="wrap_content" |
| 80 | android:layout_height="wrap_content" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 81 | android:layout_marginEnd="@dimen/call_log_icon_margin" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 82 | android:textColor="?attr/call_log_primary_text_color" |
Chiao Cheng | 037bbac | 2013-11-13 14:55:45 -0800 | [diff] [blame] | 83 | android:textSize="16sp" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 84 | android:singleLine="true" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 85 | /> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 86 | <LinearLayout |
| 87 | android:layout_width="wrap_content" |
| 88 | android:layout_height="wrap_content" |
| 89 | android:orientation="horizontal" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 90 | > |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 91 | <TextView |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 92 | android:id="@+id/label" |
| 93 | android:layout_width="wrap_content" |
| 94 | android:layout_height="wrap_content" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 95 | android:layout_marginEnd="@dimen/call_log_icon_margin" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 96 | android:textColor="?attr/call_log_secondary_text_color" |
Chiao Cheng | 037bbac | 2013-11-13 14:55:45 -0800 | [diff] [blame] | 97 | android:textSize="12sp" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 98 | android:singleLine="true" |
| 99 | android:ellipsize="marquee" |
| 100 | /> |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 101 | </LinearLayout> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 102 | <LinearLayout |
| 103 | android:id="@+id/call_type" |
| 104 | android:layout_width="wrap_content" |
| 105 | android:layout_height="wrap_content" |
| 106 | android:orientation="horizontal" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 107 | > |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 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" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 113 | android:layout_marginEnd="@dimen/call_log_icon_margin" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 114 | android:layout_gravity="center_vertical" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 115 | /> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 116 | <TextView |
| 117 | android:id="@+id/call_count_and_date" |
| 118 | android:layout_width="wrap_content" |
| 119 | android:layout_height="wrap_content" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 120 | android:layout_marginEnd="@dimen/call_log_icon_margin" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 121 | android:layout_gravity="center_vertical" |
| 122 | android:textColor="?attr/call_log_secondary_text_color" |
Chiao Cheng | 037bbac | 2013-11-13 14:55:45 -0800 | [diff] [blame] | 123 | android:textSize="12sp" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 124 | android:singleLine="true" |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 125 | /> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 126 | </LinearLayout> |
| 127 | </LinearLayout> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 128 | </LinearLayout> |
Tyler Gunn | c0f6db9 | 2014-02-26 08:28:53 -0800 | [diff] [blame^] | 129 | <!-- Linear layout to house a vertical separator line and the secondary action button. |
| 130 | Used as a convenience to hide both the separator and action button at the same |
| 131 | time. --> |
| 132 | <LinearLayout |
| 133 | android:id="@+id/secondary_action_view" |
| 134 | android:layout_width="@dimen/call_log_call_action_width" |
| 135 | android:layout_height="match_parent" |
| 136 | android:orientation="horizontal" |
| 137 | android:gravity="center_vertical" |
| 138 | > |
| 139 | <!-- Thin vertical divider to visually separate the secondary action button --> |
| 140 | <View |
| 141 | android:id="@+id/vertical_divider" |
| 142 | android:layout_width="@dimen/call_log_list_item_vertical_divider_width" |
| 143 | android:layout_height="match_parent" |
| 144 | android:layout_marginTop="@dimen/call_log_list_item_vertical_divider_margin" |
| 145 | android:layout_marginBottom="@dimen/call_log_list_item_vertical_divider_margin" |
| 146 | android:background="?android:attr/dividerVertical"/> |
| 147 | <!-- The secondary action button; either play voicemail or call details. --> |
| 148 | <ImageButton |
| 149 | android:id="@+id/secondary_action_icon" |
| 150 | android:layout_width="match_parent" |
| 151 | android:layout_height="match_parent" |
| 152 | android:paddingStart="@dimen/call_log_inner_margin" |
| 153 | android:paddingTop="@dimen/call_log_inner_margin" |
| 154 | android:paddingBottom="@dimen/call_log_inner_margin" |
| 155 | android:paddingEnd="@dimen/call_log_inner_margin" |
| 156 | android:scaleType="center" |
| 157 | android:background="?android:attr/selectableItemBackground" |
| 158 | android:nextFocusLeft="@id/primary_action_view" |
| 159 | /> |
| 160 | </LinearLayout> |
| 161 | </LinearLayout> |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 162 | <TextView |
| 163 | android:id="@+id/call_log_header" |
| 164 | style="@style/ContactListSeparatorTextViewStyle" |
Fabrice Di Meglio | c341db0 | 2013-04-03 21:11:37 -0700 | [diff] [blame] | 165 | android:layout_marginStart="@dimen/call_log_outer_margin" |
| 166 | android:layout_marginEnd="@dimen/call_log_outer_margin" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 167 | android:paddingTop="@dimen/call_log_inner_margin" |
| 168 | android:paddingBottom="@dimen/call_log_inner_margin" /> |
| 169 | |
Chiao Cheng | c5b6a69 | 2013-09-24 15:40:43 -0700 | [diff] [blame] | 170 | <!-- Displays the extra link section --> |
| 171 | <ViewStub android:id="@+id/link_stub" |
| 172 | android:layout="@layout/call_log_list_item_extra" |
| 173 | android:layout_width="match_parent" |
| 174 | android:layout_height="wrap_content"/> |
| 175 | |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 176 | </view> |