Update style of updates column for tablet.
Fixes Bug:5193808 [Updates] Pixel perfect
Change-Id: Iafa6386ac93b0b332d7a2e7a041e08cf84e09f08
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml b/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
index 71c2267..5daf555 100644
--- a/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
@@ -20,4 +20,6 @@
android:layout_height="match_parent"
android:background="@color/background_social_updates"
android:fadingEdge="none"
- android:divider="@null"/>
+ android:divider="@null"
+ android:paddingTop="@dimen/contact_detail_list_top_padding"
+ android:clipToPadding="false"/>
diff --git a/res/layout-sw580dp/contact_detail_updates_fragment.xml b/res/layout-sw580dp/contact_detail_updates_fragment.xml
index 3bcb01c..513254e 100644
--- a/res/layout-sw580dp/contact_detail_updates_fragment.xml
+++ b/res/layout-sw580dp/contact_detail_updates_fragment.xml
@@ -25,7 +25,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdge="none"
- android:divider="@null"/>
+ android:divider="@null"
+ android:paddingTop="32dip"/>
<View
android:id="@+id/alpha_overlay"
diff --git a/res/layout/stream_item_container.xml b/res/layout/stream_item_container.xml
index a88dd9a..6a65357 100644
--- a/res/layout/stream_item_container.xml
+++ b/res/layout/stream_item_container.xml
@@ -17,14 +17,16 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/detail_update_section_side_padding"
+ android:paddingRight="@dimen/detail_update_section_side_padding">
<TableLayout
android:id="@+id/stream_item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/detail_update_section_item_vertical_padding"
- android:paddingBottom="@dimen/detail_update_section_item_last_row_extra_vertical_padding"
+ android:paddingBottom="@dimen/detail_update_section_item_vertical_padding"
android:paddingLeft="@dimen/detail_update_section_item_horizontal_padding"
android:paddingRight="@dimen/detail_update_section_item_horizontal_padding"
android:background="?android:attr/selectableItemBackground"
@@ -34,8 +36,6 @@
android:id="@+id/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="1px"
- android:layout_marginLeft="@dimen/detail_update_section_side_padding"
- android:layout_marginRight="@dimen/detail_update_section_side_padding"
android:background="?android:attr/dividerHorizontal" />
</LinearLayout>
diff --git a/res/layout/stream_item_row_image_and_text.xml b/res/layout/stream_item_row_image_and_text.xml
index 8c67ce1..ea87ff0 100644
--- a/res/layout/stream_item_row_image_and_text.xml
+++ b/res/layout/stream_item_row_image_and_text.xml
@@ -17,7 +17,8 @@
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:paddingBottom="@dimen/detail_update_section_between_items_vertical_padding">
+ android:paddingBottom="@dimen/detail_update_section_between_items_vertical_padding"
+ android:paddingTop="@dimen/detail_update_section_between_items_vertical_padding">
<view
class="com.android.contacts.widget.ProportionalLayout"
@@ -45,12 +46,11 @@
android:id="@+id/stream_item_second_text"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="wrap_content">
<TextView android:id="@+id/stream_item_html"
android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
+ android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="?android:attr/textColorPrimary" />
@@ -69,7 +69,8 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/detail_update_section_attribution_comments_padding"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary" />
+ android:textColor="?android:attr/textColorSecondary"
+ android:visibility="gone" />
</LinearLayout>
</LinearLayout>
diff --git a/res/layout/updates_title.xml b/res/layout/updates_title.xml
index 78fe178..995a3b9 100644
--- a/res/layout/updates_title.xml
+++ b/res/layout/updates_title.xml
@@ -34,9 +34,7 @@
android:textAllCaps="true"
android:singleLine="true"
android:ellipsize="end"
- android:paddingLeft="8dip"
- android:paddingTop="5dip"
- android:paddingBottom="2dip" />
+ style="@style/UpdatesTitleStyle"/>
<View
android:layout_width="match_parent"
diff --git a/res/values-sw580dp-w1000dp/dimens.xml b/res/values-sw580dp-w1000dp/dimens.xml
index 34c89fc..fe03b0d 100644
--- a/res/values-sw580dp-w1000dp/dimens.xml
+++ b/res/values-sw580dp-w1000dp/dimens.xml
@@ -22,4 +22,5 @@
<dimen name="detail_header_view_margin">16dip</dimen>
<dimen name="detail_header_attribution_height">56dip</dimen>
<dimen name="detail_update_section_top_padding">48dip</dimen>
+ <dimen name="contact_detail_list_top_padding">32dip</dimen>
</resources>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index 0a7bb6b..ef0e04f 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -21,7 +21,7 @@
<dimen name="editor_round_button_padding_right">16dip</dimen>
<dimen name="editor_kind_title_left_padding">16dip</dimen>
<dimen name="editor_add_field_label_left_padding">24dip</dimen>
- <dimen name="detail_item_side_margin">0dip</dimen>
+ <dimen name="detail_item_side_margin">16dip</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>
@@ -32,10 +32,11 @@
<dimen name="shortcut_icon_size">64dip</dimen>
<dimen name="list_section_height">37dip</dimen>
<dimen name="group_detail_border_padding">16dip</dimen>
- <dimen name="detail_update_section_side_padding">0dip</dimen>
+ <dimen name="detail_update_section_side_padding">16dip</dimen>
<dimen name="detail_update_section_item_horizontal_padding">8dip</dimen>
- <dimen name="detail_update_section_item_vertical_padding">32dip</dimen>
- <dimen name="detail_update_section_item_last_row_extra_vertical_padding">16dip</dimen>
+ <dimen name="detail_update_section_item_vertical_padding">16dip</dimen>
+ <dimen name="detail_update_section_between_items_vertical_padding">16dip</dimen>
+ <dimen name="detail_update_section_item_last_row_extra_vertical_padding">8dip</dimen>
<dimen name="search_view_width">400dip</dimen>
<!-- Center vertically -->
<dimen name="quick_contact_top_position">-1px</dimen>
@@ -63,4 +64,5 @@
<dimen name="account_container_left_padding">16dip</dimen>
<!-- Left padding of the auto complete field to line hint text up with member list -->
<dimen name="group_editor_autocomplete_left_padding">16dip</dimen>
+ <dimen name="contact_detail_list_top_padding">8dip</dimen>
</resources>
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index 4029401..5f18d22 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -121,4 +121,11 @@
<item name="android:windowNoDisplay">true</item>
<item name="android:windowIsFloating">true</item>
</style>
+
+ <style name="UpdatesTitleStyle">
+ <item name="android:paddingLeft">8dip</item>
+ <item name="android:layout_height">16dip</item>
+ <item name="android:layout_gravity">center_vertical</item>
+ <item name="android:gravity">center_vertical</item>
+ </style>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index aa421f1..90cb071 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -265,4 +265,10 @@
<item name="android:displayOptions"></item>
</style>
+ <style name="UpdatesTitleStyle">
+ <item name="android:paddingLeft">8dip</item>
+ <item name="android:paddingTop">5dip</item>
+ <item name="android:paddingBottom">2dip</item>
+ </style>
+
</resources>