Adds space between the header and top card regardless of which card it is.
Bug: 16385103
Change-Id: I7e6ee6d04f8b55bb803358f9dc249897264dd533
diff --git a/res/layout/quickcontact_content.xml b/res/layout/quickcontact_content.xml
index e98e599..bab8b6d 100644
--- a/res/layout/quickcontact_content.xml
+++ b/res/layout/quickcontact_content.xml
@@ -25,7 +25,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:id="@+id/card_container">
+ android:id="@+id/card_container"
+ android:paddingTop="@dimen/first_card_marginTop"
+ android:background="@color/card_margin_color" >
<!-- We cannot set the border directly on ExpandingEntryCardView without it looking
funny because of the card's elevation value. So we need a parent FrameLayout -->
@@ -36,7 +38,6 @@
<com.android.contacts.quickcontact.ExpandingEntryCardView
style="@style/ExpandingEntryCardStyle"
android:id="@+id/no_contact_data_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
android:visibility="gone" />
</FrameLayout>
@@ -47,7 +48,6 @@
<com.android.contacts.quickcontact.ExpandingEntryCardView
style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
android:visibility="gone" />
</FrameLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 877a68f..40adc95 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -152,7 +152,7 @@
<dimen name="expanding_entry_card_border_width">12dp</dimen>
<!-- Top margin for the communication card, used to add space from header. -->
- <dimen name="communication_card_marginTop">12dp</dimen>
+ <dimen name="first_card_marginTop">12dp</dimen>
<!-- Elevation of an ExpandingEntryCard, for the sake of shadow casting -->
<dimen name="expanding_entry_card_elevation">1dp</dimen>