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

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

Issue 1839213003: Further delay the title animation to avoid collision with security icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/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 f5fae2adcee8fe6ef866c464255351919a3b36ee..550be6fde07ea591df21b37801c606dbd3edcb60 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
@@ -52,7 +52,7 @@ import org.chromium.ui.base.WindowAndroid;
*/
public class CustomTabToolbar extends ToolbarLayout implements LocationBar,
View.OnLongClickListener {
- private static final int TITLE_ANIM_DELAY_MS = 200;
+ private static final int TITLE_ANIM_DELAY_MS = 800;
private static final int STATE_DOMAIN_ONLY = 0;
private static final int STATE_TITLE_ONLY = 1;
private static final int STATE_DOMAIN_AND_TITLE = 2;
@@ -259,13 +259,8 @@ public class CustomTabToolbar extends ToolbarLayout implements LocationBar,
if (mState == STATE_DOMAIN_AND_TITLE
&& !TextUtils.equals(currentTab.getTitle(), currentTab.getUrl())
&& !TextUtils.equals(currentTab.getTitle(), "about:blank")) {
- long duration = System.currentTimeMillis() - mInitializeTimeStamp;
- if (duration >= TITLE_ANIM_DELAY_MS) {
- mTitleAnimationStarter.run();
- } else {
- ThreadUtils.postOnUiThreadDelayed(mTitleAnimationStarter,
Ian Wen 2016/03/30 00:42:58 Empirically speaking, title and security info alwa
- TITLE_ANIM_DELAY_MS - duration);
- }
+ // Delay the title animation until security icon animation finishes.
+ ThreadUtils.postOnUiThreadDelayed(mTitleAnimationStarter, TITLE_ANIM_DELAY_MS);
}
mTitleBar.setText(currentTab.getTitle());

Powered by Google App Engine
This is Rietveld 408576698