Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunView.java

Issue 1901623002: Unified Bookmarks and Recent Tabs signin methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunView.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunView.java
index d36038967abdca965dd4a305d96d172b5b57e82c..74f8582a21aaef7d659e7a89fb2638782402e565 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunView.java
@@ -48,12 +48,13 @@ public class FirstRunView extends FrameLayout {
return true;
}
- protected boolean isDynamicPaddingEnabled() {
- return true;
- }
-
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ // There was a requirement to have the titles and images of all of the first run experience
+ // pages to be vertically aligned so the transitions between pages look nice.
+ // The other requirement is for an alternate layout in horizontal mode for screens of a
+ // certain size. These are why the padding is set manually.
+
// This assumes that view's layout_width is set to match_parent.
assert MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.EXACTLY;
@@ -96,12 +97,10 @@ public class FirstRunView extends FrameLayout {
}
// Add padding to get it roughly centered.
- if (isDynamicPaddingEnabled()) {
- int topPadding = Math.max(0, (height / 2) - halfContentHeight);
+ int topPadding = Math.max(0, (height / 2) - halfContentHeight);
- mMainLayout.setPadding(mMainLayout.getPaddingLeft(), topPadding,
- mMainLayout.getPaddingRight(), mMainLayout.getPaddingBottom());
- }
+ mMainLayout.setPadding(mMainLayout.getPaddingLeft(), topPadding,
+ mMainLayout.getPaddingRight(), mMainLayout.getPaddingBottom());
ApiCompatibilityUtils.setPaddingRelative(mImageAndContent,
imageAndContentPaddingStart,

Powered by Google App Engine
This is Rietveld 408576698