Update the formatting of call log entries.
Use the three line style that is also used in the details view, in fact,
reuse the helper class and layout from that class.
Fix a few cases that were correctly handled by the call log list but not
by the details view.
Change-Id: I32e6516a571d6e3d95b5f0e414a4fc711cb6a51b
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index 1fe6faa..6a03493 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -52,7 +52,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/contact_background"
- android:background="?attr/call_detail_primary_background_color"
+ android:background="?attr/call_log_primary_background_color"
/>
<LinearLayout
android:layout_width="match_parent"
@@ -96,14 +96,14 @@
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:paddingLeft="80dp"
- android:background="?attr/call_detail_secondary_background_color"
+ android:background="?attr/call_log_secondary_background_color"
>
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
- android:textColor="?attr/call_detail_secondary_text_color"
+ android:textColor="?attr/call_log_secondary_text_color"
/>
<TextView
android:id="@+id/duration"
@@ -112,7 +112,7 @@
android:layout_alignParentLeft="true"
android:layout_below="@id/time"
android:layout_alignLeft="@id/time"
- android:textColor="?attr/call_detail_secondary_text_color"
+ android:textColor="?attr/call_log_secondary_text_color"
/>
<ImageView
android:id="@+id/delete"
diff --git a/res/layout/call_log_contact_photo.xml b/res/layout/call_log_contact_photo.xml
index 178c45b..552e9ca 100644
--- a/res/layout/call_log_contact_photo.xml
+++ b/res/layout/call_log_contact_photo.xml
@@ -2,9 +2,9 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<QuickContactBadge
android:id="@+id/contact_photo"
- android:layout_width="?attr/call_log_contact_photo_size"
- android:layout_height="?attr/call_log_contact_photo_size"
- android:layout_margin="?attr/call_log_contact_photo_margin"
+ android:layout_width="?attr/call_log_list_contact_photo_size"
+ android:layout_height="?attr/call_log_list_contact_photo_size"
+ android:layout_margin="?attr/call_log_list_contact_photo_margin"
android:layout_alignParentLeft="true"
android:layout_gravity="center_vertical"
/>
diff --git a/res/layout/call_log_list_group_item.xml b/res/layout/call_log_list_group_item.xml
index 352d7ec..57465a6 100644
--- a/res/layout/call_log_list_group_item.xml
+++ b/res/layout/call_log_list_group_item.xml
@@ -21,75 +21,5 @@
<include layout="@layout/call_log_contact_photo"/>
<include layout="@layout/call_log_action_group"/>
-
- <TextView android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/divider"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="8dip"
- android:layout_marginLeft="10dip"
-
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:singleLine="true"
- />
-
- <TextView android:id="@+id/label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
- android:layout_marginLeft="86dip"
- android:layout_marginRight="5dip"
- android:layout_alignBaseline="@id/date"
-
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold"
- />
-
- <TextView android:id="@+id/number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/label"
- android:layout_toLeftOf="@id/date"
- android:layout_alignBaseline="@id/label"
- android:layout_alignWithParentIfMissing="true"
-
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
-
- <TextView android:id="@+id/groupSize"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_toLeftOf="@id/divider"
- android:layout_above="@id/date"
- android:layout_alignWithParentIfMissing="true"
- android:layout_marginBottom="-10dip"
-
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:singleLine="true"
- android:gravity="center_vertical"
- />
-
- <TextView android:id="@+id/line1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:layout_toLeftOf="@+id/groupSize"
- android:layout_above="@id/date"
- android:layout_alignWithParentIfMissing="true"
- android:layout_marginLeft="86dip"
- android:layout_marginBottom="-10dip"
-
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:gravity="center_vertical"
- />
+ <include layout="@layout/call_log_list_item_layout" />
</RelativeLayout>
diff --git a/res/layout/call_log_list_item_layout.xml b/res/layout/call_log_list_item_layout.xml
index 2128a79..8ea2bf7 100644
--- a/res/layout/call_log_list_item_layout.xml
+++ b/res/layout/call_log_list_item_layout.xml
@@ -15,69 +15,12 @@
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <ImageView android:id="@+id/call_type_icon"
+ <RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="54dip"
- />
-
- <TextView android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/divider"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="8dip"
- android:layout_marginLeft="10dip"
-
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:singleLine="true"
- />
-
- <TextView android:id="@+id/label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
- android:layout_marginLeft="86dip"
- android:layout_marginRight="5dip"
- android:layout_alignBaseline="@id/date"
-
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold"
- />
-
- <TextView android:id="@+id/number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/label"
- android:layout_toLeftOf="@id/date"
- android:layout_alignBaseline="@id/label"
- android:layout_alignWithParentIfMissing="true"
-
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
-
- <TextView android:id="@+id/line1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
+ android:layout_toRightOf="@id/contact_photo"
android:layout_alignParentTop="true"
- android:layout_toLeftOf="@id/divider"
- android:layout_above="@id/date"
- android:layout_alignWithParentIfMissing="true"
- android:layout_marginLeft="86dip"
- android:layout_marginBottom="-10dip"
-
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:gravity="center_vertical"
- />
+ >
+ <include layout="@layout/call_log_phone_call_details"/>
+ </RelativeLayout>
</merge>
diff --git a/res/layout/call_log_phone_call_details.xml b/res/layout/call_log_phone_call_details.xml
index 5d167f1..f22efba 100644
--- a/res/layout/call_log_phone_call_details.xml
+++ b/res/layout/call_log_phone_call_details.xml
@@ -32,15 +32,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/call_detail_primary_text_color"
+ android:textColor="?attr/call_log_primary_text_color"
/>
<TextView
android:id="@+id/call_type_separator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="?attr/call_detail_date_margin"
+ android:layout_marginLeft="?attr/call_log_date_margin"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/call_detail_primary_text_color"
+ android:textColor="?attr/call_log_primary_text_color"
android:text="@string/call_log_type_date_separator"
/>
</LinearLayout>
@@ -49,9 +49,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/call_detail_primary_text_color"
+ android:textColor="?attr/call_log_primary_text_color"
android:layout_toRightOf="@id/call_type"
- android:layout_marginLeft="?attr/call_detail_date_margin"
+ android:layout_marginLeft="?attr/call_log_date_margin"
android:layout_alignParentBottom="true"
/>
<TextView
@@ -59,7 +59,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/call_detail_primary_text_color"
+ android:textColor="?attr/call_log_primary_text_color"
android:layout_alignParentLeft="true"
android:layout_above="@id/call_type"
/>
@@ -68,7 +68,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?attr/call_detail_primary_text_color"
+ android:textColor="?attr/call_log_primary_text_color"
android:layout_alignParentLeft="true"
android:layout_above="@id/number"
android:paddingBottom="2dp"