Fade in animation for bookmarks
Bug: 3368824
Change-Id: Iefa77f32e74f50024d79879bf1a0362d086b2b17
diff --git a/res/values/integers.xml b/res/values/integers.xml
index 3356f77..a899a14 100644
--- a/res/values/integers.xml
+++ b/res/values/integers.xml
@@ -23,4 +23,6 @@
<integer name="max_width_crumb">200</integer>
<!-- The maximum number of most visited URLs in the history tab -->
<integer name="most_visits_limit">10</integer>
+ <!-- Animation durations -->
+ <integer name="comboViewFadeInDuration">400</integer>
</resources>
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 053fd7e..bca999d 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -18,6 +18,7 @@
import com.android.browser.Tab.LockIcon;
+import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -450,6 +451,11 @@
WebView web = mActiveTab.getWebView();
mActiveTab.putInBackground();
}
+ mComboView.setAlpha(0f);
+ ObjectAnimator anim = ObjectAnimator.ofFloat(mComboView, "alpha", 0f, 1f);
+ Resources res = mActivity.getResources();
+ anim.setDuration(res.getInteger(R.integer.comboViewFadeInDuration));
+ anim.start();
mContentView.addView(mComboView, COVER_SCREEN_PARAMS);
}