Merge "Style contact detail list items on tablet contact card"
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml b/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
index 4cb4096..b57e85c 100644
--- a/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
@@ -42,7 +42,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
- android:paddingLeft="12dip"
+ android:paddingLeft="8dip"
android:orientation="vertical">
<TextView
@@ -56,6 +56,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorSecondary"
android:visibility="gone" />
</LinearLayout>
@@ -68,37 +69,27 @@
android:gravity="center"
android:scaleType="centerInside" />
- <FrameLayout
+ <TextView
+ android:id="@+id/kind"
android:layout_width="wrap_content"
- android:layout_height="@dimen/detail_min_line_item_height"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin">
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
- <TextView
- android:id="@+id/kind"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone" />
+ <TextView
+ android:id="@+id/type"
+ style="@style/ContactDetailItemType"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingRight="16dip" />
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:orientation="horizontal">
+ <View
+ android:id="@+id/primary_indicator"
+ android:layout_width="16dip"
+ android:layout_height="16dip"
+ android:visibility="gone"
+ android:layout_gravity="center_vertical"
+ android:background="@drawable/ic_menu_mark" />
- <TextView
- android:id="@+id/type"
- style="@style/ContactDetailItemType" />
-
- <View
- android:id="@+id/primary_indicator"
- android:layout_width="16dip"
- android:layout_height="16dip"
- android:visibility="gone"
- android:layout_gravity="center_vertical"
- android:background="@drawable/ic_menu_mark" />
-
- </LinearLayout>
- </FrameLayout>
</com.android.contacts.detail.PrimaryActionViewContainer>
<View
diff --git a/res/layout-sw580dp-w1000dp/detail_header_contact_with_updates.xml b/res/layout-sw580dp-w1000dp/detail_header_contact_with_updates.xml
index dce00ac..6ce811f 100644
--- a/res/layout-sw580dp-w1000dp/detail_header_contact_with_updates.xml
+++ b/res/layout-sw580dp-w1000dp/detail_header_contact_with_updates.xml
@@ -52,7 +52,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorSecondary" />
<CheckBox
android:id="@+id/star"
diff --git a/res/layout-sw580dp-w1000dp/detail_header_contact_without_updates.xml b/res/layout-sw580dp-w1000dp/detail_header_contact_without_updates.xml
index 486b7c2..be82d88 100644
--- a/res/layout-sw580dp-w1000dp/detail_header_contact_without_updates.xml
+++ b/res/layout-sw580dp-w1000dp/detail_header_contact_without_updates.xml
@@ -36,7 +36,8 @@
android:id="@+id/company"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorSecondary" />
<CheckBox
android:id="@+id/star"
diff --git a/res/layout-sw580dp/detail_header_contact_with_updates.xml b/res/layout-sw580dp/detail_header_contact_with_updates.xml
index 01e4c7e..fd45c3b 100644
--- a/res/layout-sw580dp/detail_header_contact_with_updates.xml
+++ b/res/layout-sw580dp/detail_header_contact_with_updates.xml
@@ -54,7 +54,8 @@
android:id="@+id/company"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorSecondary" />
<CheckBox
android:id="@+id/star"
diff --git a/res/layout-sw580dp/detail_header_contact_without_updates.xml b/res/layout-sw580dp/detail_header_contact_without_updates.xml
index 04fbad9..8379619 100644
--- a/res/layout-sw580dp/detail_header_contact_without_updates.xml
+++ b/res/layout-sw580dp/detail_header_contact_without_updates.xml
@@ -41,7 +41,8 @@
android:id="@+id/company"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorSecondary" />
<CheckBox
android:id="@+id/star"
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
index 205bc81..e2818e9 100644
--- a/res/layout/contact_detail_list_item.xml
+++ b/res/layout/contact_detail_list_item.xml
@@ -24,6 +24,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
+ android:paddingTop="12dip"
+ android:paddingBottom="12dip"
android:minHeight="@dimen/detail_min_line_item_height">
<!-- Note: padding might be controlled programatically -->
@@ -64,7 +66,9 @@
<TextView
android:id="@+id/type"
- style="@style/ContactDetailItemType" />
+ style="@style/ContactDetailItemType"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
<View
android:id="@+id/primary_indicator"
@@ -82,6 +86,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorSecondary"
android:visibility="gone" />
</LinearLayout>
diff --git a/res/layout/contact_detail_network_title_entry_view.xml b/res/layout/contact_detail_network_title_entry_view.xml
index 2cede93..bc0d3f1 100644
--- a/res/layout/contact_detail_network_title_entry_view.xml
+++ b/res/layout/contact_detail_network_title_entry_view.xml
@@ -32,6 +32,8 @@
android:id="@+id/network_icon"
android:layout_width="@dimen/detail_network_icon_size"
android:layout_height="@dimen/detail_network_icon_size"
+ android:layout_marginLeft="@dimen/detail_item_icon_margin"
+ android:layout_marginRight="@dimen/detail_item_icon_margin"
android:layout_gravity="center_vertical"
android:scaleType="centerInside" />
@@ -39,7 +41,6 @@
android:id="@+id/network_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/detail_item_side_margin"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium" />
diff --git a/res/values-sw580dp-w720dp/styles.xml b/res/values-sw580dp-w720dp/styles.xml
index d4487b2..4de10b6 100644
--- a/res/values-sw580dp-w720dp/styles.xml
+++ b/res/values-sw580dp-w720dp/styles.xml
@@ -16,6 +16,8 @@
<resources>
<style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.SolidActionBar.Inverse.SplitActionBarWhenNarrow">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <item name="android:textColorPrimary">@color/primary_text_color</item>
+ <item name="android:textColorSecondary">@color/secondary_text_color</item>
<item name="list_item_height">66dip</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="android:windowContentOverlay">@null</item>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index a10d234..ab630d2 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -23,6 +23,8 @@
<dimen name="editor_field_top_padding">12dip</dimen>
<dimen name="editor_field_bottom_padding">12dip</dimen>
<dimen name="detail_item_side_margin">0dip</dimen>
+ <dimen name="detail_item_vertical_margin">16dip</dimen>
+ <dimen name="detail_item_icon_margin">8dip</dimen>
<dimen name="contact_name_text_size">26sp</dimen>
<dimen name="action_bar_filter_min_width">120dip</dimen>
<dimen name="action_bar_filter_max_width">120dip</dimen>
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index cf4c4ee..256683a 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -16,6 +16,8 @@
<resources>
<style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.SolidActionBar.Inverse.SplitActionBarWhenNarrow">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <item name="android:textColorPrimary">@color/primary_text_color</item>
+ <item name="android:textColorSecondary">@color/secondary_text_color</item>
<item name="list_item_height">66dip</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="android:windowContentOverlay">@null</item>
@@ -103,17 +105,6 @@
<item name="android:windowIsFloating">true</item>
</style>
- <style name="ContactDetailItemType">
- <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">?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">
<item name="android:background">@drawable/list_item_activated_background</item>
</style>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index b6b3f31..552d47b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -85,6 +85,12 @@
<!-- Color of the theme of the People app -->
<color name="people_app_theme_color">#33B5E5</color>
+ <!-- Primary text color in the People app -->
+ <color name="primary_text_color">#333333</color>
+
+ <!-- Secondary text color in the People app -->
+ <color name="secondary_text_color">#777777</color>
+
<!-- Colors in the contact browser list -->
<color name="contact_browser_list_bk_color">#EEEEEE</color>
<color name="contact_count_text_color">#777777</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 6f1e84b..58374ce 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -76,6 +76,8 @@
<style name="ContactDetailActivityTheme" parent="@android:style/Theme.Holo.Light.SolidActionBar.Inverse">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
<item name="android:windowContentOverlay">@null</item>
+ <item name="android:textColorPrimary">@color/primary_text_color</item>
+ <item name="android:textColorSecondary">@color/secondary_text_color</item>
</style>
<style name="ContactEditorActivityTheme" parent="@android:style/Theme.Holo.Light.SolidActionBar.Inverse.SplitActionBarWhenNarrow">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
@@ -117,6 +119,8 @@
<style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.SolidActionBar.Inverse.SplitActionBarWhenNarrow">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <item name="android:textColorPrimary">@color/primary_text_color</item>
+ <item name="android:textColorSecondary">@color/secondary_text_color</item>
<item name="list_item_height">?android:attr/listPreferredItemHeight</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="section_header_background">@drawable/list_title_holo</item>
@@ -154,6 +158,8 @@
<!-- TODO: Clean up this file so themes aren't copied. -->
<style name="GroupDetailTheme" parent="@android:style/Theme.Holo.Light.SolidActionBar.Inverse.SplitActionBarWhenNarrow">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <item name="android:textColorPrimary">@color/primary_text_color</item>
+ <item name="android:textColorSecondary">@color/secondary_text_color</item>
<item name="list_item_height">?android:attr/listPreferredItemHeight</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="section_header_background">@drawable/list_title_holo</item>
@@ -238,13 +244,11 @@
</style>
<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/textAppearanceSmall</item>
- <item name="android:textColor">?android:attr/textColorTertiary</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">marquee</item>
- <item name="android:gravity">center_vertical</item>
+ <item name="android:layout_gravity">center_vertical</item>
</style>
<style name="GroupBrowseListItem">
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index c3b2de6..f550a0f 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -1990,7 +1990,8 @@
R.dimen.detail_item_side_margin);
mPaddingTop = resources.getDimensionPixelSize(
R.dimen.detail_item_vertical_margin);
- mWidePaddingLeft = 2 * mPaddingLeft +
+ mWidePaddingLeft = mPaddingLeft +
+ resources.getDimensionPixelSize(R.dimen.detail_item_icon_margin) +
resources.getDimensionPixelSize(R.dimen.detail_network_icon_size);
mPaddingRight = mPaddingLeft;
mPaddingBottom = mPaddingTop;