diff options
author | Michael Kolb <kolby@google.com> | 2011-01-21 11:06:18 -0800 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-01-21 14:26:56 -0800 |
commit | 7dad8f0c238853de01d5d200b306092b5cfa0026 (patch) | |
tree | 84a19797890e1acb45b553a32726703b38e1ab49 /src | |
parent | 3a6e2aefac6965d9495d0d594fade774ebd6b136 (diff) | |
download | packages_apps_Browser-7dad8f0c238853de01d5d200b306092b5cfa0026.zip packages_apps_Browser-7dad8f0c238853de01d5d200b306092b5cfa0026.tar.gz packages_apps_Browser-7dad8f0c238853de01d5d200b306092b5cfa0026.tar.bz2 |
fix scroll callback for webview
http://b/issue?id=3377268
added check to see if state changed
Change-Id: Ic367144fb7bacb809e8acc7772298129d5c30388
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/TabBar.java | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java index b0057ed..1ab02ed 100644 --- a/src/com/android/browser/TabBar.java +++ b/src/com/android/browser/TabBar.java @@ -230,6 +230,17 @@ public class TabBar extends LinearLayout } } + boolean showsTitleBarIndicator() { + Tab tab = mTabControl.getCurrentTab(); + if (tab != null) { + TabView tv = mTabMap.get(tab); + if (tv != null) { + return tv.showsIndicator(); + } + } + return false; + } + // callback after fake titlebar is shown void onShowTitleBar() { showTitleBarIndicator(false); @@ -251,10 +262,14 @@ public class TabBar extends LinearLayout if (mTabControl.getCurrentTab() != null && !isLoading()) { if (visibleTitleHeight == 0) { - mUi.hideFakeTitleBar(); - showTitleBarIndicator(true); + if (!showsTitleBarIndicator()) { + mUi.hideFakeTitleBar(); + showTitleBarIndicator(true); + } } else { - showTitleBarIndicator(false); + if (showsTitleBarIndicator()) { + showTitleBarIndicator(false); + } } } mVisibleTitleHeight = visibleTitleHeight; @@ -336,6 +351,10 @@ public class TabBar extends LinearLayout } } + boolean showsIndicator() { + return (mIndicator.getVisibility() == View.VISIBLE); + } + @Override public void onClick(View v) { if (v == mClose) { |