Contact detail list changes
- Bring back DataKind header labels
- Fix dividers
- Add networks section for 3rd party entries
- Move phonetic name (previously in header) into list of contact details
- Move attribution (previously in header) under networks section
- Rearrange ordering of DataKind sections according to mocks
- Do some minor re-styling for phone
Change-Id: Ic49e521e122b00a6038b0679f21b90e2323b9171
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml b/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
index 9ad0e1b..2de488d 100644
--- a/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
@@ -43,7 +43,9 @@
<TextView
android:id="@+id/kind"
- style="@style/ContactDetailItemType" />
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
<TextView
android:id="@+id/type"
@@ -83,7 +85,7 @@
android:scaleType="centerInside" />
<View
- android:id="@+id/divider"
+ android:id="@+id/vertical_divider"
android:layout_width="1px"
android:layout_height="match_parent"
android:layout_marginTop="5dip"
diff --git a/res/layout-sw580dp/simple_contact_detail_header_view_list_item.xml b/res/layout-sw580dp/simple_contact_detail_header_view_list_item.xml
index b14d563..5960022 100644
--- a/res/layout-sw580dp/simple_contact_detail_header_view_list_item.xml
+++ b/res/layout-sw580dp/simple_contact_detail_header_view_list_item.xml
@@ -46,18 +46,6 @@
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium" />
- <TextView
- android:id="@+id/phonetic_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- <TextView
- android:id="@+id/attribution"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
<CheckBox
android:id="@+id/star"
android:layout_width="wrap_content"
diff --git a/res/layout/contact_detail_kind_title_entry_view.xml b/res/layout/contact_detail_kind_title_entry_view.xml
new file mode 100644
index 0000000..379cbe1
--- /dev/null
+++ b/res/layout/contact_detail_kind_title_entry_view.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/detail_item_side_margin"
+ android:paddingRight="@dimen/detail_item_side_margin"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/kind"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/detail_kind_title_color"
+ android:textStyle="bold"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:paddingTop="5dip"
+ android:paddingBottom="2dip" />
+
+ <View
+ android:id="@+id/kind_divider"
+ android:layout_width="match_parent"
+ android:layout_height="2dip"
+ android:background="@color/detail_kind_title_color"/>
+
+</LinearLayout>
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
index 2e4a3e5..a116cb3 100644
--- a/res/layout/contact_detail_list_item.xml
+++ b/res/layout/contact_detail_list_item.xml
@@ -22,6 +22,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/detail_item_side_margin"
+ android:paddingRight="@dimen/detail_item_side_margin"
+ android:paddingTop="@dimen/detail_item_vertical_margin"
+ android:paddingBottom="@dimen/detail_item_vertical_margin"
android:orientation="horizontal"
android:gravity="center_vertical">
@@ -34,27 +37,29 @@
<TextView
android:id="@+id/kind"
- style="@style/ContactDetailItemType" />
-
- <TextView
- android:id="@+id/type"
- style="@style/ContactDetailItemType" />
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
<TextView
android:id="@+id/data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:paddingBottom="5dip"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
+ android:id="@+id/type"
+ style="@style/ContactDetailItemType" />
+
+ <TextView
android:id="@+id/footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
android:visibility="gone" />
+
</LinearLayout>
<ImageView
@@ -66,7 +71,7 @@
android:scaleType="centerInside" />
<View
- android:id="@+id/divider"
+ android:id="@+id/vertical_divider"
android:layout_width="1px"
android:layout_height="match_parent"
android:layout_marginTop="15dip"
diff --git a/res/layout/contact_detail_separator_list_item.xml b/res/layout/contact_detail_separator_entry_view.xml
similarity index 68%
rename from res/layout/contact_detail_separator_list_item.xml
rename to res/layout/contact_detail_separator_entry_view.xml
index 87f0597..abdca5f 100644
--- a/res/layout/contact_detail_separator_list_item.xml
+++ b/res/layout/contact_detail_separator_entry_view.xml
@@ -14,9 +14,15 @@
limitations under the License.
-->
-<View xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="8dip"
- android:background="@drawable/divider_horizontal_light"
- />
\ No newline at end of file
+ android:paddingLeft="@dimen/detail_item_side_margin"
+ android:paddingRight="@dimen/detail_item_side_margin">
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="?android:attr/listDivider"/>
+
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/simple_contact_detail_header_view_list_item.xml b/res/layout/simple_contact_detail_header_view_list_item.xml
index 0c0867f..eea4ac4 100644
--- a/res/layout/simple_contact_detail_header_view_list_item.xml
+++ b/res/layout/simple_contact_detail_header_view_list_item.xml
@@ -14,17 +14,10 @@
limitations under the License.
-->
-<!--
- This view temporarily holds the extra information that used to be in the
- original contact detail header view, but now must move into the list because
- of the new tab carousel. TODO: Integrate this better into the list as provided
- by the mocks.
--->
-<LinearLayout
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:layout_height="wrap_content">
<ImageView
android:id="@+id/photo"
@@ -32,18 +25,4 @@
android:layout_width="match_parent"
android:layout_height="@dimen/detail_tab_carousel_height" />
- <TextView
- android:id="@+id/phonetic_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- <TextView
- android:id="@+id/attribution"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
-</LinearLayout>
\ No newline at end of file
+</FrameLayout>
\ No newline at end of file
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index b34efcc..32d02be 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -112,7 +112,7 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
- <item name="android:textColor">@color/detail_item_type_color</item>
+ <item name="android:textColor">?android:attr/textColorTertiary</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">marquee</item>
<item name="android:gravity">center_vertical</item>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 9d726e2..496d55f 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -43,6 +43,9 @@
<!-- Color of the line above the contact photo in the contact detail header -->
<color name="contact_detail_header_divider_color">#FF999999</color>
+ <!-- Color of the title text and divider for the kind type on the contact detail page -->
+ <color name="detail_kind_title_color">#63B8FF</color>
+
<!-- Color of the text indicating the type of entry (e.g. Home, Work etc) -->
<color name="detail_item_type_color">#B4B4B4</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index d248f5b..7ab889c 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -116,7 +116,10 @@
<dimen name="detail_item_icon_margin">10dip</dimen>
<!-- Left and right padding for a contact detail item -->
- <dimen name="detail_item_side_margin">10dip</dimen>
+ <dimen name="detail_item_side_margin">16dip</dimen>
+
+ <!-- Top and bottom padding for a contact detail item -->
+ <dimen name="detail_item_vertical_margin">12dip</dimen>
<!-- Minimum height of a row in the contact detail -->
<dimen name="detail_min_line_item_height">48dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4103060..0e47ebb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1262,6 +1262,9 @@
<!-- Field title for the phonetic name of a contact [CHAR LIMIT=64]-->
<string name="name_phonetic">Phonetic name</string>
+ <!-- Title for the list of all contact details that come from third-party sources (including a corporate directory) [CHAR LIMIT=20] -->
+ <string name="network">Network</string>
+
<!-- String describing which account type a contact came from when editing it -->
<string name="account_type_format"><xliff:g id="source" example="Gmail">%1$s</xliff:g> contact</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index fbd8653..2abfaa2 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -276,12 +276,11 @@
<style name="ContactDetailItemType">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
- <item name="android:textColor">@color/detail_item_type_color</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+ <item name="android:textColor">?android:attr/textColorTertiary</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">marquee</item>
<item name="android:gravity">center_vertical</item>
- <item name="android:paddingTop">5dip</item>
</style>
<style name="GroupBrowseListItem">