diff options
author | John Reck <jreck@google.com> | 2011-06-07 16:34:43 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-06-07 16:34:58 -0700 |
commit | 541f55a0178da7c09fb32aa5385effae031ea071 (patch) | |
tree | c1e6d7554b9d682fbd6db5b00e7702a8f355ab5f /src/com/android/browser/TabBar.java | |
parent | f33b1637487af3786ee30f295f2c84db6db1e6b3 (diff) | |
download | android_packages_apps_Gello-541f55a0178da7c09fb32aa5385effae031ea071.tar.gz android_packages_apps_Gello-541f55a0178da7c09fb32aa5385effae031ea071.tar.bz2 android_packages_apps_Gello-541f55a0178da7c09fb32aa5385effae031ea071.zip |
Freeze tab improvements
Change-Id: I5d5e5a7a18cafdbe845fa1ef949276bdfd1996d3
Diffstat (limited to 'src/com/android/browser/TabBar.java')
-rw-r--r-- | src/com/android/browser/TabBar.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java index 6c3949ac..6e84a404 100644 --- a/src/com/android/browser/TabBar.java +++ b/src/com/android/browser/TabBar.java @@ -238,7 +238,7 @@ public class TabBar extends LinearLayout void showTitleBarIndicator(boolean show) { Tab tab = mTabControl.getCurrentTab(); - if (tab != null) { + if (tab != null && !tab.isSnapshot()) { TabView tv = mTabMap.get(tab); if (tv != null) { tv.showIndicator(show); @@ -325,6 +325,7 @@ public class TabBar extends LinearLayout TextView mTitle; View mIndicator; View mIncognito; + View mSnapshot; ImageView mIconView; ImageView mLock; ImageView mClose; @@ -355,6 +356,7 @@ public class TabBar extends LinearLayout mClose = (ImageView) mTabContent.findViewById(R.id.close); mClose.setOnClickListener(this); mIncognito = mTabContent.findViewById(R.id.incognito); + mSnapshot = mTabContent.findViewById(R.id.snapshot); mIndicator = mTabContent.findViewById(R.id.chevron); mSelected = false; mInLoad = false; @@ -399,11 +401,15 @@ public class TabBar extends LinearLayout if (mTab.getFavicon() != null) { setFavicon(renderFavicon(mTab.getFavicon())); } - if (mTab != null) { - mIncognito.setVisibility( - mTab.isPrivateBrowsingEnabled() ? - View.VISIBLE : View.GONE); - } + updateTabIcons(); + } + + private void updateTabIcons() { + mIncognito.setVisibility( + mTab.isPrivateBrowsingEnabled() ? + View.VISIBLE : View.GONE); + mSnapshot.setVisibility(mTab.isSnapshot() + ? View.VISIBLE : View.GONE); } @Override @@ -666,6 +672,7 @@ public class TabBar extends LinearLayout } else if (url != null) { tv.setDisplayTitle(UrlUtils.stripUrl(url)); } + tv.updateTabIcons(); } } |