Adds card margins and elevation style for ExpandingEntryCardView
Change-Id: I560a4d311b522d0c73cf04b5a16f8440fe1d107e
diff --git a/res/layout-land/quickcontact_activity.xml b/res/layout-land/quickcontact_activity.xml
index 6b85eae..43d26db 100644
--- a/res/layout-land/quickcontact_activity.xml
+++ b/res/layout-land/quickcontact_activity.xml
@@ -30,9 +30,7 @@
<include layout="@layout/quickcontact_photo_container" />
</view>
<com.android.contacts.quickcontact.ExpandingEntryCardView
+ style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@color/quickcontact_activity_background" />
+ android:layout_marginTop="@dimen/communication_card_marginTop" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-sw600dp-land/quickcontact_activity.xml b/res/layout-sw600dp-land/quickcontact_activity.xml
index 563ca43..fc2aee2 100644
--- a/res/layout-sw600dp-land/quickcontact_activity.xml
+++ b/res/layout-sw600dp-land/quickcontact_activity.xml
@@ -26,9 +26,7 @@
<include layout="@layout/quickcontact_photo_container" />
</FrameLayout>
<com.android.contacts.quickcontact.ExpandingEntryCardView
+ style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@color/quickcontact_activity_background" />
+ android:layout_marginTop="@dimen/communication_card_marginTop" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-sw600dp/quickcontact_activity.xml b/res/layout-sw600dp/quickcontact_activity.xml
index 686212d..88efc46 100644
--- a/res/layout-sw600dp/quickcontact_activity.xml
+++ b/res/layout-sw600dp/quickcontact_activity.xml
@@ -26,9 +26,7 @@
<include layout="@layout/quickcontact_photo_container" />
</FrameLayout>
<com.android.contacts.quickcontact.ExpandingEntryCardView
+ style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@color/quickcontact_activity_background" />
+ android:layout_marginTop="@dimen/communication_card_marginTop" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-sw720dp-land/quickcontact_activity.xml b/res/layout-sw720dp-land/quickcontact_activity.xml
index 563ca43..fc2aee2 100644
--- a/res/layout-sw720dp-land/quickcontact_activity.xml
+++ b/res/layout-sw720dp-land/quickcontact_activity.xml
@@ -26,9 +26,7 @@
<include layout="@layout/quickcontact_photo_container" />
</FrameLayout>
<com.android.contacts.quickcontact.ExpandingEntryCardView
+ style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@color/quickcontact_activity_background" />
+ android:layout_marginTop="@dimen/communication_card_marginTop" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/quickcontact_activity.xml b/res/layout/quickcontact_activity.xml
index f4bf72b..fcf348b 100644
--- a/res/layout/quickcontact_activity.xml
+++ b/res/layout/quickcontact_activity.xml
@@ -41,11 +41,8 @@
</view>
<com.android.contacts.quickcontact.ExpandingEntryCardView
+ style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/quickcontact_activity_background"
- android:orientation="vertical" />
+ android:layout_marginTop="@dimen/communication_card_marginTop" />
</LinearLayout>
-
</ScrollView>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index cc1d9b0..0f5997b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -15,7 +15,6 @@
-->
<resources>
- <color name="quickcontact_activity_background">#fff5f5f5</color>
<color name="quickcontact_name_detail_background">#66000000</color>
<!-- Color of the background of the contact detail and editor pages -->
@@ -45,6 +44,9 @@
<!-- Color of the text on an ExpandingEntryCard button -->
<color name="expanding_entry_card_button_text_color">@android:color/black</color>
+ <!-- Background color for an ExpandingEntryCard -->
+ <color name="expanding_entry_card_background_color">#f7f8f9</color>
+
<!-- Color of the margin for cards -->
<color name="card_margin_color">#ffbbbbbb</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4995f71..e60fb84 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -134,6 +134,18 @@
<dimen name="contact_picker_contact_list_min_height">550dip</dimen>
+ <!-- Margins for ExpandingEntryCardView -->
+ <dimen name="expanding_entry_card_marginStart">8dp</dimen>
+ <dimen name="expanding_entry_card_marginEnd">8dp</dimen>
+ <dimen name="expanding_entry_card_marginBottom">8dp</dimen>
+
+ <!-- Elevation of an ExpandingEntryCard -->
+ <dimen name="expanding_entry_card_elevation">2dp</dimen>
+
+ <!-- Top margin for the communication card, used to add space from header. -->
+ <dimen name="communication_card_marginTop">8dp</dimen>
+
+
<!-- Size of the title text for a ExpandingEntryCardView -->
<dimen name="expanding_entry_card_title_text_size">16sp</dimen>
<!-- Padding for the title text for a ExpandingEntryCardView -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 36c6b11..d282466 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -254,4 +254,15 @@
<item name="android:textSize">18sp</item>
</style>
+ <style name="ExpandingEntryCardStyle">
+ <item name="android:elevation">@dimen/expanding_entry_card_elevation</item>
+ <item name="android:background">@color/expanding_entry_card_background_color</item>
+ <item name="android:layout_marginBottom">@dimen/expanding_entry_card_marginBottom</item>
+ <item name="android:layout_marginEnd">@dimen/expanding_entry_card_marginEnd</item>
+ <item name="android:layout_marginStart">@dimen/expanding_entry_card_marginStart</item>
+ <item name="android:orientation">vertical</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ </style>
+
</resources>