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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java

Issue 1247513002: [Custom Tabs] Make location bar always anchor left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
index 31e59ce75d044eb4215c3300837d9177c007c967..b2b35807fb94e7f7861a89920a3eeefef0565a59 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
@@ -464,10 +464,14 @@ public class CustomTabToolbar extends ToolbarLayout implements LocationBar,
mLocationBarFrameLayout.setLayoutParams(urlLayoutParams);
}
- // Set left margin of mTitleUrlContainer here to make sure the security icon is always
+ // Update left margin of mTitleUrlContainer here to make sure the security icon is always
// placed left of the urlbar.
LayoutParams lp = (LayoutParams) mTitleUrlContainer.getLayoutParams();
- lp.leftMargin = mSecurityButton.getMeasuredWidth();
+ if (mSecurityButton.getVisibility() == View.GONE) {
+ lp.leftMargin = 0;
+ } else {
+ lp.leftMargin = mSecurityButton.getMeasuredWidth();
+ }
mTitleUrlContainer.setLayoutParams(lp);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698