Centerize contents of contextual cards and remove white space.

Decrease the minHeight of the two buttons in the dismissal view and have
the contents centered.

Change-Id: I806e8ccae88e693dc222a13940597fd33684ee70
Fixes: 120086509
Test: visual
This commit is contained in:
Yi-Ling Chuang
2019-01-04 15:43:58 +08:00
parent 6be224a919
commit 1f320fa346
4 changed files with 5 additions and 0 deletions

View File

@@ -40,6 +40,7 @@
style="@style/ContextualCardDismissalButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/homepage_card_dismissal_margin_bottom"
android:text="@string/contextual_card_dismiss_keep"/>
<Button
@@ -47,6 +48,7 @@
style="@style/ContextualCardDismissalButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/homepage_card_dismissal_margin_bottom"
android:text="@string/contextual_card_dismiss_remove"/>
</LinearLayout>

View File

@@ -30,6 +30,7 @@
android:id="@+id/slice_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingStart="@dimen/homepage_card_padding_start"
android:paddingEnd="@dimen/homepage_card_padding_end"/>

View File

@@ -330,6 +330,7 @@
<dimen name="homepage_half_card_padding_top">12dp</dimen>
<dimen name="homepage_half_card_padding_bottom">16dp</dimen>
<dimen name="homepage_half_card_title_margin_top">12dp</dimen>
<dimen name="homepage_card_dismissal_margin_bottom">2dp</dimen>
<!-- Horizontal divider size and margin -->
<dimen name="horizontal_divider_margin_top">4dp</dimen>

View File

@@ -459,6 +459,7 @@
<style name="ContextualCardDismissalButton"
parent="android:Widget.DeviceDefault.Button.Borderless.Colored">
<item name="android:minHeight">16dp</item>
<item name="android:textAllCaps">false</item>
</style>