Merge "Apply new slice attributes to customize layout"

This commit is contained in:
TreeHugger Robot
2019-02-14 20:43:23 +00:00
committed by Android (Google) Code Review
3 changed files with 36 additions and 5 deletions

View File

@@ -32,10 +32,10 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="left" android:gravity="left"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="@dimen/homepage_deferred_setup_card_padding_bottom"
android:paddingEnd="@dimen/homepage_card_padding_end"
android:paddingStart="@dimen/homepage_card_padding_start" android:paddingStart="@dimen/homepage_card_padding_start"
android:paddingTop="@dimen/homepage_deferred_setup_card_padding_top"> android:paddingEnd="@dimen/homepage_card_padding_end"
android:paddingTop="@dimen/homepage_deferred_setup_card_padding_top"
android:paddingBottom="@dimen/homepage_deferred_setup_card_padding_bottom">
<ImageView <ImageView
android:id="@android:id/icon" android:id="@android:id/icon"

View File

@@ -31,8 +31,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:paddingStart="@dimen/homepage_card_padding_start" style="@style/slice_view_style"/>
android:paddingEnd="@dimen/homepage_card_padding_end"/>
<!--dismissal view--> <!--dismissal view-->
<include layout="@layout/homepage_dismissal_view"/> <include layout="@layout/homepage_dismissal_view"/>

View File

@@ -476,4 +476,36 @@
<item name="android:textSize">14sp</item> <item name="android:textSize">14sp</item>
</style> </style>
<style name="slice_view_style">
<!-- 4dp start padding for the start icon -->
<item name="android:paddingStart">4dp</item>
<!-- End margin of content without end items is 24dp.
android:paddingEnd = 24 - 16(contentEndPadding) -->
<item name="android:paddingEnd">8dp</item>
<item name="rowStyle">@style/slice_row_style</item>
</style>
<style name="slice_row_style">
<item name="titleItemEndPadding">0dp</item>
<!-- Padding between content and the start icon is 12dp. -->
<item name="contentStartPadding">12dp</item>
<!-- Padding between content and end items is 16dp. -->
<item name="contentEndPadding">16dp</item>
<!-- Both side margins of end item are 16dp.
endItemEndPadding = 16 - 8(android:paddingEnd) -->
<item name="endItemStartPadding">16dp</item>
<item name="endItemEndPadding">8dp</item>
<!-- Both side margins of bottom divider are 12dp.
bottomDividerStartPadding = 12 - 4(android:paddingStart)
bottomDividerEndPadding = 12 - 8(android:paddingEnd) -->
<item name="bottomDividerStartPadding">8dp</item>
<item name="bottomDividerEndPadding">4dp</item>
<item name="actionDividerHeight">32dp</item>
</style>
</resources> </resources>