summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/NavTabView.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-08-16 14:21:46 -0700
committerJohn Reck <jreck@google.com>2011-08-16 14:42:55 -0700
commit502a353bb815bee8bec6a60f3b741dc62e4729cd (patch)
tree8d04631f8c34dda56cd42ee636bbfb81958104ee /src/com/android/browser/NavTabView.java
parent73be9db12f41f8cf3625a9dd7f5ddcf91504cfcd (diff)
downloadpackages_apps_Browser-502a353bb815bee8bec6a60f3b741dc62e4729cd.zip
packages_apps_Browser-502a353bb815bee8bec6a60f3b741dc62e4729cd.tar.gz
packages_apps_Browser-502a353bb815bee8bec6a60f3b741dc62e4729cd.tar.bz2
Add incognito and snapshot icons to tab switcher
Bug: 5162768 Change-Id: Ie0e1af52d26d236f666c26e2aaccaf4f9f28eb95
Diffstat (limited to 'src/com/android/browser/NavTabView.java')
-rw-r--r--src/com/android/browser/NavTabView.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/browser/NavTabView.java b/src/com/android/browser/NavTabView.java
index 07ac164..4eec702 100644
--- a/src/com/android/browser/NavTabView.java
+++ b/src/com/android/browser/NavTabView.java
@@ -90,6 +90,22 @@ public class NavTabView extends LinearLayout {
}
mTitle.setText(txt);
}
+ if (mTab.isSnapshot()) {
+ setTitleIcon(R.drawable.ic_history_holo_dark);
+ } else if (mTab.isPrivateBrowsingEnabled()) {
+ setTitleIcon(R.drawable.ic_incognito_holo_dark);
+ } else {
+ setTitleIcon(0);
+ }
+ }
+
+ private void setTitleIcon(int id) {
+ if (id == 0) {
+ mTitle.setPadding(mTitle.getCompoundDrawablePadding(), 0, 0, 0);
+ } else {
+ mTitle.setPadding(0, 0, 0, 0);
+ }
+ mTitle.setCompoundDrawablesWithIntrinsicBounds(id, 0, 0, 0);
}
protected boolean isHighlighted() {