Merge "Alignment of Settings contextual homepage"

This commit is contained in:
TreeHugger Robot
2019-03-07 06:07:05 +00:00
committed by Android (Google) Code Review
6 changed files with 23 additions and 16 deletions

View File

@@ -30,7 +30,7 @@
android:id="@+id/content" android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/homepage_card_padding_start" android:paddingStart="@dimen/homepage_card_icon_padding_start"
android:paddingEnd="@dimen/homepage_full_card_padding_end" android:paddingEnd="@dimen/homepage_full_card_padding_end"
android:paddingTop="@dimen/homepage_condition_full_card_padding_top" android:paddingTop="@dimen/homepage_condition_full_card_padding_top"
android:paddingBottom="@dimen/homepage_condition_full_card_padding_bottom" android:paddingBottom="@dimen/homepage_condition_full_card_padding_bottom"

View File

@@ -31,7 +31,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/homepage_card_padding_start"
android:paddingEnd="@dimen/homepage_card_padding_end" android:paddingEnd="@dimen/homepage_card_padding_end"
android:orientation="vertical"> android:orientation="vertical">
@@ -39,6 +38,7 @@
android:id="@android:id/icon" android:id="@android:id/icon"
android:layout_width="@dimen/homepage_card_icon_size" android:layout_width="@dimen/homepage_card_icon_size"
android:layout_height="@dimen/homepage_card_icon_size" android:layout_height="@dimen/homepage_card_icon_size"
android:layout_marginStart="@dimen/homepage_card_icon_padding_start"
android:tint="?android:attr/colorAccent"/> android:tint="?android:attr/colorAccent"/>
<TextView <TextView
@@ -47,6 +47,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
android:layout_marginStart="@dimen/homepage_card_text_padding_start"
android:layout_marginTop="@dimen/homepage_condition_half_card_title_margin_top" android:layout_marginTop="@dimen/homepage_condition_half_card_title_margin_top"
android:layout_marginBottom="@dimen/homepage_condition_card_title_margin_bottom" android:layout_marginBottom="@dimen/homepage_condition_card_title_margin_bottom"
android:textAppearance="@style/TextAppearance.ConditionCardTitle"/> android:textAppearance="@style/TextAppearance.ConditionCardTitle"/>
@@ -57,6 +58,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lines="2" android:lines="2"
android:ellipsize="end" android:ellipsize="end"
android:layout_marginStart="@dimen/homepage_card_text_padding_start"
android:layout_marginBottom="@dimen/homepage_condition_half_card_summary_margin_bottom" android:layout_marginBottom="@dimen/homepage_condition_half_card_summary_margin_bottom"
android:textAppearance="@style/TextAppearance.ConditionCardSummary"/> android:textAppearance="@style/TextAppearance.ConditionCardSummary"/>

View File

@@ -27,7 +27,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="left" android:gravity="left"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="@dimen/homepage_card_padding_start"
android:paddingEnd="@dimen/homepage_card_padding_end" android:paddingEnd="@dimen/homepage_card_padding_end"
android:paddingTop="@dimen/homepage_deferred_setup_card_padding_top" android:paddingTop="@dimen/homepage_deferred_setup_card_padding_top"
android:paddingBottom="@dimen/homepage_deferred_setup_card_padding_bottom"> android:paddingBottom="@dimen/homepage_deferred_setup_card_padding_bottom">
@@ -35,12 +34,14 @@
<ImageView <ImageView
android:id="@android:id/icon" android:id="@android:id/icon"
android:layout_width="@dimen/homepage_card_icon_size" android:layout_width="@dimen/homepage_card_icon_size"
android:layout_height="@dimen/homepage_card_icon_size"/> android:layout_height="@dimen/homepage_card_icon_size"
android:layout_marginStart="@dimen/homepage_card_icon_padding_start"/>
<TextView <TextView
android:id="@android:id/title" android:id="@android:id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/homepage_card_text_padding_start"
android:layout_marginTop="@dimen/homepage_deferred_setup_card_title_margin_top" android:layout_marginTop="@dimen/homepage_deferred_setup_card_title_margin_top"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
@@ -51,6 +52,7 @@
android:id="@android:id/summary" android:id="@android:id/summary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/homepage_card_text_padding_start"
android:layout_marginTop="@dimen/homepage_deferred_setup_card_summary_margin_top" android:layout_marginTop="@dimen/homepage_deferred_setup_card_summary_margin_top"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
@@ -62,6 +64,7 @@
style="@style/DeferredSetupCardButton" style="@style/DeferredSetupCardButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/homepage_card_text_padding_start"
android:layout_marginTop="@dimen/homepage_deferred_setup_card_button_margin_top" android:layout_marginTop="@dimen/homepage_deferred_setup_card_button_margin_top"
android:text="@string/suggestion_button_text"/> android:text="@string/suggestion_button_text"/>

View File

@@ -30,7 +30,6 @@
android:id="@+id/content" android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingStart="@dimen/homepage_card_padding_start"
android:paddingEnd="@dimen/homepage_card_padding_end" android:paddingEnd="@dimen/homepage_card_padding_end"
android:paddingTop="@dimen/homepage_half_card_padding_top" android:paddingTop="@dimen/homepage_half_card_padding_top"
android:paddingBottom="@dimen/homepage_half_card_padding_bottom" android:paddingBottom="@dimen/homepage_half_card_padding_bottom"
@@ -39,7 +38,8 @@
<ImageView <ImageView
android:id="@android:id/icon" android:id="@android:id/icon"
android:layout_width="@dimen/homepage_card_icon_size" android:layout_width="@dimen/homepage_card_icon_size"
android:layout_height="@dimen/homepage_card_icon_size"/> android:layout_height="@dimen/homepage_card_icon_size"
android:layout_marginStart="@dimen/homepage_card_icon_padding_start"/>
<TextView <TextView
android:id="@android:id/title" android:id="@android:id/title"
@@ -48,6 +48,7 @@
android:maxLines="2" android:maxLines="2"
android:minLines="1" android:minLines="1"
android:ellipsize="end" android:ellipsize="end"
android:layout_marginStart="@dimen/homepage_card_text_padding_start"
android:layout_marginTop="@dimen/homepage_half_card_title_margin_top" android:layout_marginTop="@dimen/homepage_half_card_title_margin_top"
android:textAppearance="@style/TextAppearance.ConditionCardTitle"/> android:textAppearance="@style/TextAppearance.ConditionCardTitle"/>

View File

@@ -331,7 +331,8 @@
<dimen name="homepage_card_icon_size">24dp</dimen> <dimen name="homepage_card_icon_size">24dp</dimen>
<dimen name="homepage_card_vertical_margin">8dp</dimen> <dimen name="homepage_card_vertical_margin">8dp</dimen>
<dimen name="homepage_card_side_margin">4dp</dimen> <dimen name="homepage_card_side_margin">4dp</dimen>
<dimen name="homepage_card_padding_start">16dp</dimen> <dimen name="homepage_card_icon_padding_start">14dp</dimen>
<dimen name="homepage_card_text_padding_start">16dp</dimen>
<dimen name="homepage_card_padding_end">16dp</dimen> <dimen name="homepage_card_padding_end">16dp</dimen>
<dimen name="homepage_full_card_padding_end">12dp</dimen> <dimen name="homepage_full_card_padding_end">12dp</dimen>
<dimen name="homepage_half_card_padding_top">12dp</dimen> <dimen name="homepage_half_card_padding_top">12dp</dimen>
@@ -369,13 +370,13 @@
<dimen name="homepage_condition_half_card_padding_top">12dp</dimen> <dimen name="homepage_condition_half_card_padding_top">12dp</dimen>
<dimen name="homepage_condition_half_card_title_margin_top">12dp</dimen> <dimen name="homepage_condition_half_card_title_margin_top">12dp</dimen>
<dimen name="homepage_condition_half_card_summary_margin_bottom">12dp</dimen> <dimen name="homepage_condition_half_card_summary_margin_bottom">12dp</dimen>
<dimen name="homepage_condition_full_card_padding_start">12dp</dimen> <dimen name="homepage_condition_full_card_padding_start">24dp</dimen>
<dimen name="homepage_condition_full_card_padding_end">16dp</dimen> <dimen name="homepage_condition_full_card_padding_end">16dp</dimen>
<dimen name="homepage_condition_full_card_padding_top">12dp</dimen> <dimen name="homepage_condition_full_card_padding_top">12dp</dimen>
<dimen name="homepage_condition_full_card_padding_bottom">12dp</dimen> <dimen name="homepage_condition_full_card_padding_bottom">12dp</dimen>
<dimen name="homepage_condition_header_padding_top">10dp</dimen> <dimen name="homepage_condition_header_padding_top">10dp</dimen>
<dimen name="homepage_condition_header_padding_bottom">10dp</dimen> <dimen name="homepage_condition_header_padding_bottom">10dp</dimen>
<dimen name="homepage_condition_header_icons_margin_start">16dp</dimen> <dimen name="homepage_condition_header_icons_margin_start">14dp</dimen>
<dimen name="homepage_condition_header_indicator_padding_top">4dp</dimen> <dimen name="homepage_condition_header_indicator_padding_top">4dp</dimen>
<dimen name="homepage_condition_header_indicator_padding_start">16dp</dimen> <dimen name="homepage_condition_header_indicator_padding_start">16dp</dimen>
<dimen name="homepage_condition_header_indicator_padding_end">16dp</dimen> <dimen name="homepage_condition_header_indicator_padding_end">16dp</dimen>

View File

@@ -448,7 +448,7 @@
<style name="ConditionFullCardBorderlessButton" <style name="ConditionFullCardBorderlessButton"
parent="@style/ConditionCardBorderlessButton"> parent="@style/ConditionCardBorderlessButton">
<item name="android:textAlignment">viewStart</item> <item name="android:textAlignment">viewStart</item>
<item name="android:paddingStart">50dp</item> <item name="android:paddingStart">62dp</item>
<item name="android:paddingEnd">50dp</item> <item name="android:paddingEnd">50dp</item>
</style> </style>
@@ -484,8 +484,8 @@
</style> </style>
<style name="SliceViewStyle"> <style name="SliceViewStyle">
<!-- 4dp start padding for the start icon --> <!-- 2dp start padding for the start icon -->
<item name="android:paddingStart">4dp</item> <item name="android:paddingStart">2dp</item>
<!-- End margin of content without end items is 24dp. <!-- End margin of content without end items is 24dp.
android:paddingEnd = 24 - 16(contentEndPadding) --> android:paddingEnd = 24 - 16(contentEndPadding) -->
@@ -497,8 +497,8 @@
<style name="SliceRowStyle"> <style name="SliceRowStyle">
<item name="titleItemEndPadding">0dp</item> <item name="titleItemEndPadding">0dp</item>
<!-- Padding between content and the start icon is 12dp. --> <!-- Padding between content and the start icon is 14dp. -->
<item name="contentStartPadding">12dp</item> <item name="contentStartPadding">14dp</item>
<!-- Padding between content and end items is 16dp. --> <!-- Padding between content and end items is 16dp. -->
<item name="contentEndPadding">16dp</item> <item name="contentEndPadding">16dp</item>
@@ -508,9 +508,9 @@
<item name="endItemEndPadding">8dp</item> <item name="endItemEndPadding">8dp</item>
<!-- Both side margins of bottom divider are 12dp. <!-- Both side margins of bottom divider are 12dp.
bottomDividerStartPadding = 12 - 4(android:paddingStart) bottomDividerStartPadding = 12 - 2(android:paddingStart)
bottomDividerEndPadding = 12 - 8(android:paddingEnd) --> bottomDividerEndPadding = 12 - 8(android:paddingEnd) -->
<item name="bottomDividerStartPadding">8dp</item> <item name="bottomDividerStartPadding">10dp</item>
<item name="bottomDividerEndPadding">4dp</item> <item name="bottomDividerEndPadding">4dp</item>
<item name="actionDividerHeight">32dp</item> <item name="actionDividerHeight">32dp</item>