summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserSnapshotPage.java5
-rw-r--r--src/com/android/browser/SnapshotBar.java11
-rw-r--r--src/com/android/browser/TabBar.java3
3 files changed, 10 insertions, 9 deletions
diff --git a/src/com/android/browser/BrowserSnapshotPage.java b/src/com/android/browser/BrowserSnapshotPage.java
index afa02693..c01691ff 100644
--- a/src/com/android/browser/BrowserSnapshotPage.java
+++ b/src/com/android/browser/BrowserSnapshotPage.java
@@ -303,11 +303,6 @@ public class BrowserSnapshotPage extends Fragment implements
}
TextView title = (TextView) view.findViewById(R.id.title);
title.setText(cursor.getString(SNAPSHOT_TITLE));
- TextView size = (TextView) view.findViewById(R.id.size);
- if (size != null) {
- int stateLen = cursor.getInt(SNAPSHOT_VIEWSTATE_SIZE);
- size.setText(String.format("%.2fMB", stateLen / 1024f / 1024f));
- }
long timestamp = cursor.getLong(SNAPSHOT_DATE_CREATED);
TextView date = (TextView) view.findViewById(R.id.date);
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
diff --git a/src/com/android/browser/SnapshotBar.java b/src/com/android/browser/SnapshotBar.java
index cdaf3ef0..eeb300bb 100644
--- a/src/com/android/browser/SnapshotBar.java
+++ b/src/com/android/browser/SnapshotBar.java
@@ -82,6 +82,8 @@ public class SnapshotBar extends LinearLayout implements OnClickListener {
new Observable.Observer() {
@Override
public void onChange(Object... params) {
+ if (mTabText == null)
+ return;
if ((Integer) params[0] > 9) {
mTabText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTabSwitcherCompressedTextSize);
} else {
@@ -133,7 +135,7 @@ public class SnapshotBar extends LinearLayout implements OnClickListener {
resetAnimation();
}
- if (mTabSwitcherInitialTextSize == 0) {
+ if (mTabSwitcherInitialTextSize == 0 && mTabText != null) {
mTabSwitcherInitialTextSize = mTabText.getTextSize();
mTabSwitcherCompressedTextSize = (float) (mTabSwitcherInitialTextSize / 1.2);
}
@@ -203,6 +205,9 @@ public class SnapshotBar extends LinearLayout implements OnClickListener {
if (navBar instanceof NavigationBarPhone) {
((NavigationBarPhone)navBar).showMenu(mOverflowMenu);
}
+ else if (navBar instanceof NavigationBarTablet) {
+ ((NavigationBarTablet)navBar).showMenu(mOverflowMenu);
+ }
} else if (mToggleContainer == v && !mIsAnimating) {
mIsAnimating = true;
showDate();
@@ -250,13 +255,13 @@ public class SnapshotBar extends LinearLayout implements OnClickListener {
}
public void setReadericonVisibility(int visibility) {
- if (mReadericon.getVisibility() != visibility) {
+ if (mReadericon != null && mReadericon.getVisibility() != visibility) {
mReadericon.setVisibility(visibility);
}
}
public void setFaviconVisibility(int visibility) {
- if (mFavicon.getVisibility() != visibility) {
+ if (mFavicon != null && mFavicon.getVisibility() != visibility) {
mFavicon.setVisibility(visibility);
}
}
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index e446145f..378557e2 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -290,7 +290,8 @@ public class TabBar extends LinearLayout implements OnClickListener {
public void setActivated(boolean selected) {
mSelected = selected;
mClose.setVisibility(mSelected ? View.VISIBLE : View.GONE);
- mFaviconView.setVisibility(mSelected ? View.GONE : View.VISIBLE);
+ mFaviconView.setVisibility((mSelected || mTab.isSnapshot()) ?
+ View.GONE : View.VISIBLE);
mTitle.setTextAppearance(mActivity, mSelected ?
R.style.TabTitleSelected : R.style.TabTitleUnselected);
setHorizontalFadingEdgeEnabled(!mSelected);