Merge "Fix section teasers on MR0 devices. b/12720024." into ub-mail-master
diff --git a/res/layout/folder_teaser_item.xml b/res/layout/folder_teaser_item.xml
index 0eb0e41..3e53301 100644
--- a/res/layout/folder_teaser_item.xml
+++ b/res/layout/folder_teaser_item.xml
@@ -16,11 +16,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@drawable/folder_teaser_item_background"
-    android:paddingTop="8dp"
-    android:paddingBottom="8dp"
-    android:paddingLeft="16dp"
-    android:paddingRight="16dp" >
+    android:background="@drawable/folder_teaser_item_background" >
 
     <ImageView
         android:id="@+id/folder_imageView"
@@ -28,7 +24,8 @@
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
         android:background="@color/folder_teaser_icon_background"
-        android:duplicateParentState="true" />
+        android:duplicateParentState="true"
+        style="@style/FolderTeaserMarginStartStyle" />
 
     <LinearLayout
         android:id="@+id/text_layout"
@@ -39,7 +36,8 @@
         android:layout_marginLeft="12dp"
         android:layout_marginRight="12dp"
         android:duplicateParentState="true"
-        android:orientation="vertical" >
+        android:orientation="vertical"
+        style="@style/FolderTeaserVerticalMarginStyle" >
 
         <TextView
             android:id="@+id/folder_textView"
@@ -77,6 +75,7 @@
         android:paddingRight="16dp"
         android:gravity="center"
         android:textColor="@color/folder_teaser_count_text"
-        android:textSize="16sp" />
+        android:textSize="16sp"
+        style="@style/FolderTeaserMarginEndStyle" />
 
 </LinearLayout>
diff --git a/res/values-ldrtl/styles-ldrtl.xml b/res/values-ldrtl/styles-ldrtl.xml
index 2f279d7..b6f9af5 100644
--- a/res/values-ldrtl/styles-ldrtl.xml
+++ b/res/values-ldrtl/styles-ldrtl.xml
@@ -389,4 +389,16 @@
     <style name="ComposeRowStyle">
         <item name="android:paddingEnd">@dimen/compose_area_end_padding</item>
     </style>
+
+    <style name="ComposeAttachmentTileTextEndStyle">
+        <item name="android:paddingEnd">@dimen/compose_attachment_tile_text_end_padding</item>
+    </style>
+
+    <style name="FolderTeaserMarginStartStyle" parent="FolderTeaserVerticalMarginStyle">
+        <item name="android:layout_marginStart">@dimen/folder_teaser_horizontal_padding</item>
+    </style>
+
+    <style name="FolderTeaserMarginEndStyle" parent="FolderTeaserVerticalMarginStyle">
+        <item name="android:layout_marginEnd">@dimen/folder_teaser_horizontal_padding</item>
+    </style>
 </resources>
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index da0f96d..b5c4d90 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -190,4 +190,9 @@
     <dimen name="custom_from_inner_padding">6dip</dimen>
 
     <dimen name="quoted_text_header_padding">8dip</dimen>
+
+    <dimen name="compose_attachment_tile_text_end_padding">4dip</dimen>
+
+    <dimen name="folder_teaser_vertical_padding">8dip</dimen>
+    <dimen name="folder_teaser_horizontal_padding">16dip</dimen>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 7fb1b37..a4194fb 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -927,4 +927,21 @@
     <style name="ComposeRowStyle">
         <item name="android:paddingRight">@dimen/compose_area_end_padding</item>
     </style>
+
+    <style name="ComposeAttachmentTileTextEndStyle">
+        <item name="android:paddingRight">@dimen/compose_attachment_tile_text_end_padding</item>
+    </style>
+
+    <style name="FolderTeaserVerticalMarginStyle">
+        <item name="android:layout_marginTop">@dimen/folder_teaser_vertical_padding</item>
+        <item name="android:layout_marginBottom">@dimen/folder_teaser_vertical_padding</item>
+    </style>
+
+    <style name="FolderTeaserMarginStartStyle" parent="FolderTeaserVerticalMarginStyle">
+        <item name="android:layout_marginLeft">@dimen/folder_teaser_horizontal_padding</item>
+    </style>
+
+    <style name="FolderTeaserMarginEndStyle" parent="FolderTeaserVerticalMarginStyle">
+        <item name="android:layout_marginRight">@dimen/folder_teaser_horizontal_padding</item>
+    </style>
 </resources>