Commit 4c695e11 authored by Xi Han's avatar Xi Han Committed by Commit Bot

Polish WebAPK's dialog.

In the WebAPKs' dialog, there are 12dp padding between the title and the
content. Currently, these padding are added as the top padding of the
content, leaving no padding below the title. It looks fine on L+, but looks
tight on pre-L which has a blue line between the title and the content.
In this CL, we split the padding as 6dp above the blue line, and 6dp
under the blue line.

Before:
https://drive.google.com/open?id=0B7zEF5GgyYmpLU9SendyX00zZlk

After:
https://drive.google.com/open?id=0B7zEF5GgyYmpTEVBUnB6UXhaMDg

Bug: 759582
Change-Id: Iabc96357fb0741889751d2c59ba35c829e6b6863
Reviewed-on: https://chromium-review.googlesource.com/663614Reviewed-by: default avatarPeter Kotwicz <pkotwicz@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501396}
parent 57e5fd14
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<!-- Refers to https://material.googleplex.com/components/dialogs.html#dialogs-specs. --> <!-- Refers to https://material.googleplex.com/components/dialogs.html#dialogs-specs. -->
<dimen name="dialog_content_padding">24dp</dimen> <dimen name="dialog_content_padding">24dp</dimen>
<dimen name="dialog_content_top_padding">12dp</dimen> <dimen name="dialog_content_top_padding">6dp</dimen>
<dimen name="title_bottom_padding">6dp</dimen>
<dimen name="list_column_padding">16dp</dimen> <dimen name="list_column_padding">16dp</dimen>
</resources> </resources>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# (including AndroidManifest.xml) is updated. This version should be incremented # (including AndroidManifest.xml) is updated. This version should be incremented
# prior to uploading a new ShellAPK to the WebAPK Minting Server. # prior to uploading a new ShellAPK to the WebAPK Minting Server.
# Does not affect Chrome.apk # Does not affect Chrome.apk
template_shell_apk_version = 23 template_shell_apk_version = 24
# The ShellAPK version expected by Chrome. Chrome will try to update the WebAPK # The ShellAPK version expected by Chrome. Chrome will try to update the WebAPK
# if the WebAPK's ShellAPK version is less than |expected_shell_apk_version|. # if the WebAPK's ShellAPK version is less than |expected_shell_apk_version|.
......
...@@ -306,8 +306,9 @@ public class WebApkUtils { ...@@ -306,8 +306,9 @@ public class WebApkUtils {
titleView.setTextSize( titleView.setTextSize(
TypedValue.COMPLEX_UNIT_PX, res.getDimension(R.dimen.headline_size_medium)); TypedValue.COMPLEX_UNIT_PX, res.getDimension(R.dimen.headline_size_medium));
int dialogContentPadding = res.getDimensionPixelSize(R.dimen.dialog_content_padding); int dialogContentPadding = res.getDimensionPixelSize(R.dimen.dialog_content_padding);
setPaddingInPixel( int titleBottomPadding = res.getDimensionPixelSize(R.dimen.title_bottom_padding);
titleView, dialogContentPadding, dialogContentPadding, dialogContentPadding, 0); setPaddingInPixel(titleView, dialogContentPadding, dialogContentPadding,
dialogContentPadding, titleBottomPadding);
int dialogContentTopPadding = res.getDimensionPixelSize(R.dimen.dialog_content_top_padding); int dialogContentTopPadding = res.getDimensionPixelSize(R.dimen.dialog_content_top_padding);
setPaddingInPixel(contentView, dialogContentPadding, dialogContentTopPadding, setPaddingInPixel(contentView, dialogContentPadding, dialogContentTopPadding,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment