summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/PhoneUi.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-03-29 15:37:03 -0700
committerMichael Kolb <kolby@google.com>2011-03-30 16:40:49 -0700
commitc16c595136aa7b49927a43ead26241abb1c731ca (patch)
tree051cb02a46bf53e69d0ddf9ca9e67b817aa24d8f /src/com/android/browser/PhoneUi.java
parent135e3515fd06c8b32691ed73c63602424343ad1b (diff)
downloadpackages_apps_browser-c16c595136aa7b49927a43ead26241abb1c731ca.zip
packages_apps_browser-c16c595136aa7b49927a43ead26241abb1c731ca.tar.gz
packages_apps_browser-c16c595136aa7b49927a43ead26241abb1c731ca.tar.bz2
add old progress bar to ui
Change-Id: I53023ee54edf17894c51cb3247d7f2f2e2c7c240
Diffstat (limited to 'src/com/android/browser/PhoneUi.java')
-rw-r--r--src/com/android/browser/PhoneUi.java28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index 9cc5a2f..42e2aff 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -104,16 +104,22 @@ public class PhoneUi extends BaseUi {
@Override
public void onProgressChanged(Tab tab) {
- if (mUseQuickControls) return;
if (tab.inForeground()) {
int progress = tab.getLoadProgress();
mTitleBar.setProgress(progress);
if (progress == 100) {
if (!mOptionsMenuOpen || !mExtendedMenuOpen) {
hideTitleBar();
+ if (mUseQuickControls) {
+ mTitleBar.setShowProgressOnly(false);
+ }
}
} else {
if (!mOptionsMenuOpen || mExtendedMenuOpen) {
+ if (mUseQuickControls && !mTitleBar.isEditingUrl()) {
+ mTitleBar.setShowProgressOnly(true);
+ setTitleGravity(Gravity.TOP);
+ }
showTitleBar();
}
}
@@ -272,13 +278,13 @@ public class PhoneUi extends BaseUi {
@Override
public void onActionModeFinished(boolean inLoad) {
- // TODO: Remove once b/4136071 is fixed
- new Handler().post(new Runnable() {
- @Override
- public void run() {
- mActivity.getActionBar().hide();
+ if (inLoad) {
+ if (mUseQuickControls) {
+ mTitleBar.setShowProgressOnly(true);
}
- });
+ showTitleBar();
+ }
+ mActivity.getActionBar().hide();
}
@Override
@@ -331,7 +337,6 @@ public class PhoneUi extends BaseUi {
mUseQuickControls = useQuickControls;
getTitleBar().setUseQuickControls(mUseQuickControls);
if (useQuickControls) {
-// checkTabCount();
mPieControl = new PieControl(mActivity, mUiController, this);
mPieControl.attachToContainer(mContentView);
Tab tab = getActiveTab();
@@ -373,4 +378,11 @@ public class PhoneUi extends BaseUi {
.getDimension(R.dimen.tab_view_thumbnail_height));
}
}
+
+ @Override
+ void showTitleBarAndEdit() {
+ mTitleBar.setShowProgressOnly(false);
+ super.showTitleBarAndEdit();
+ }
+
}