Snap for 8656240 from d198d8ea756a7fcb62ea977305ced543f6700ab4 to tm-release
Change-Id: I732c1d3b11364ef365c56a48eedfc5faf7ba7596
diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml
index d739189..22aee0d 100644
--- a/main/res/values/attrs.xml
+++ b/main/res/values/attrs.xml
@@ -65,6 +65,21 @@
<attr name="sudButtonAllCaps" format="boolean" />
<attr name="sudButtonCornerRadius" format="dimension" />
<attr name="sudButtonFontFamily" format="string|reference" />
+ <!-- Values copied from frameworks/base/core/res/res/values/attrs.xml -->
+ <attr name="sudButtonTertiaryGravity">
+ <!-- Push object to the left of its container, not changing its size. -->
+ <flag name="left" value="0x03" />
+ <!-- Push object to the right of its container, not changing its size. -->
+ <flag name="right" value="0x05" />
+ <!-- Place object in the horizontal center of its container, not changing its size. -->
+ <flag name="center_horizontal" value="0x01" />
+ <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
+ <flag name="fill_horizontal" value="0x07" />
+ <!-- Push object to the beginning of its container, not changing its size. -->
+ <flag name="start" value="0x00800003" />
+ <!-- Push object to the end of its container, not changing its size. -->
+ <flag name="end" value="0x00800005" />
+ </attr>
<attr name="sudCardBackground" format="color|reference" />
<attr name="sudDividerCondition">
<enum name="either" value="0" />
diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml
index d675c62..e33b305 100644
--- a/main/res/values/styles.xml
+++ b/main/res/values/styles.xml
@@ -155,6 +155,7 @@
<item name="sudButtonCornerRadius">@dimen/sud_glif_button_corner_radius</item>
<item name="sudButtonFontFamily">sans-serif-medium</item>
<item name="sudButtonHighlightAlpha">0.24</item>
+ <item name="sudButtonTertiaryGravity">?attr/sudGlifHeaderGravity</item>
<item name="sudColorPrimary">?attr/colorPrimary</item>
<item name="sudContentFramePaddingTop">@dimen/sud_content_frame_padding_top</item>
<item name="sudContentFramePaddingBottom">@dimen/sud_content_frame_padding_bottom</item>
@@ -248,6 +249,7 @@
<item name="sudButtonCornerRadius">@dimen/sud_glif_button_corner_radius</item>
<item name="sudButtonFontFamily">sans-serif-medium</item>
<item name="sudButtonHighlightAlpha">0.12</item>
+ <item name="sudButtonTertiaryGravity">?attr/sudGlifHeaderGravity</item>
<item name="sudColorPrimary">?attr/colorPrimary</item>
<item name="sudContentFramePaddingTop">@dimen/sud_content_frame_padding_top</item>
<item name="sudContentFramePaddingBottom">@dimen/sud_content_frame_padding_bottom</item>
@@ -393,6 +395,7 @@
<item name="sucFooterBarButtonFontFamily">@string/sudFontSecondaryMediumMaterialYou</item>
<item name="sucGlifIconMarginTop">@dimen/sud_glif_icon_margin_top_material_you</item>
<item name="sudButtonCornerRadius">@dimen/sud_footer_bar_button_radius_material_you</item>
+ <item name="sudButtonTertiaryGravity">center_horizontal</item>
<item name="sudGlifIconSize">@dimen/sud_glif_icon_max_height_material_you</item>
<item name="sudGlifHeaderTitleStyle">@style/SudGlifHeaderTitleMaterialYou</item>
<item name="sudGlifHeaderGravity">start</item>
@@ -426,6 +429,7 @@
<item name="sucFooterBarButtonFontFamily">@string/sudFontSecondaryMediumMaterialYou</item>
<item name="sucGlifIconMarginTop">@dimen/sud_glif_icon_margin_top_material_you</item>
<item name="sudButtonCornerRadius">@dimen/sud_footer_bar_button_radius_material_you</item>
+ <item name="sudButtonTertiaryGravity">center_horizontal</item>
<item name="sudGlifIconSize">@dimen/sud_glif_icon_max_height_material_you</item>
<item name="sudGlifHeaderTitleStyle">@style/SudGlifHeaderTitleMaterialYou</item>
<item name="sudGlifHeaderGravity">start</item>
@@ -668,7 +672,7 @@
<item name="android:theme">@style/SudGlifButton.Tertiary</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">sans-serif</item>
- <item name="android:layout_gravity">?attr/sudGlifHeaderGravity</item>
+ <item name="android:layout_gravity">?attr/sudButtonTertiaryGravity</item>
<item name="android:layout_marginLeft">@dimen/sud_glif_negative_button_padding</item>
<item name="android:layout_marginRight">@dimen/sud_glif_negative_button_padding</item>
<!-- Always lowercase instead of reading attr/sudButtonAllCaps, since this is a tertiary