diff options
author | John Reck <jreck@google.com> | 2011-03-14 11:43:05 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-03-14 11:50:23 -0700 |
commit | 74830e168f578bb511240f95d373667565f0623f (patch) | |
tree | cd4c6a0999a251b06111b4a0581f31e2e1ce33e4 | |
parent | e5c21d900adadbae92fb395d3dce44a75e90a9e7 (diff) | |
download | packages_apps_browser-74830e168f578bb511240f95d373667565f0623f.zip packages_apps_browser-74830e168f578bb511240f95d373667565f0623f.tar.gz packages_apps_browser-74830e168f578bb511240f95d373667565f0623f.tar.bz2 |
Partial revert of CL 101621
Bug: 4089739
This fixes the tab switching flicker regression
Change-Id: Ica3cd0e54e0cce53fbe89653ba5e41e357c68989
-rw-r--r-- | res/values/integers.xml | 1 | ||||
-rw-r--r-- | src/com/android/browser/BaseUi.java | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/res/values/integers.xml b/res/values/integers.xml index e936ed8..ad0ed90 100644 --- a/res/values/integers.xml +++ b/res/values/integers.xml @@ -24,6 +24,7 @@ <!-- 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> <!-- fade between tabs duration --> <integer name="tabFadeDuration">300</integer> </resources> diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index e89012f..5084e31 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -17,8 +17,11 @@ package com.android.browser; import com.android.browser.Tab.LockIcon; +import com.android.browser.UI.DropdownChangeListener; -import android.animation.LayoutTransition; +import android.animation.Animator; +import android.animation.Animator.AnimatorListener; +import android.animation.ObjectAnimator; import android.app.Activity; import android.content.res.Configuration; import android.content.res.Resources; @@ -111,7 +114,6 @@ public abstract class BaseUi implements UI, WebViewFactory { .inflate(R.layout.custom_screen, null); mContentView = (FrameLayout) mBrowserFrameLayout.findViewById( R.id.main_content); - mContentView.setLayoutTransition(new LayoutTransition()); mErrorConsoleContainer = (LinearLayout) mBrowserFrameLayout .findViewById(R.id.error_console); mCustomViewContainer = (FrameLayout) mBrowserFrameLayout @@ -458,6 +460,11 @@ public abstract class BaseUi implements UI, WebViewFactory { 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); } |