summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserActivity.java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2009-09-21 16:02:01 -0400
committerLeon Scroggins <scroggo@google.com>2009-09-21 17:14:58 -0400
commit685498685d8424f48d77d26d8d5790da34645f44 (patch)
tree59df11c861295065bc6f349877553dec66fc0c02 /src/com/android/browser/BrowserActivity.java
parente6843ded7f8db1d99d42e8ccde706a35dda39755 (diff)
downloadpackages_apps_Browser-685498685d8424f48d77d26d8d5790da34645f44.tar.gz
packages_apps_Browser-685498685d8424f48d77d26d8d5790da34645f44.tar.bz2
packages_apps_Browser-685498685d8424f48d77d26d8d5790da34645f44.zip
Add a shadow to the fake title bar.
Remove old code which requests windowOverlays. When inserting the fake title bar, put a shadow underneath it. Do not show it if the scroll is at the top, since it is transparent, and showing it along with the shadow below the real title bar would show a darker shadow. Fixes http://b/issue?id=2118813 Change-Id: I84b8975ea82cc8659b702112c7e67498f863916c
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r--src/com/android/browser/BrowserActivity.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 7f8c0c6e3..b93c55451 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -972,27 +972,25 @@ public class BrowserActivity extends Activity
ViewGroup.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
- PixelFormat.OPAQUE);
+ PixelFormat.TRANSLUCENT);
params.gravity = Gravity.TOP;
WebView mainView = mTabControl.getCurrentWebView();
- params.windowAnimations = mainView == null
- || mainView.getScrollY() != 0
- ? com.android.internal.R.style.Animation_DropDownDown : 0;
+ boolean atTop = mainView != null && mainView.getScrollY() == 0;
+ params.windowAnimations = atTop ? 0
+ : com.android.internal.R.style.Animation_DropDownDown;
// XXX : Without providing an offset, the fake title bar will be
// placed underneath the status bar. Use the global visible rect
// of mBrowserFrameLayout to determine the bottom of the status bar
Rect rectangle = new Rect();
mBrowserFrameLayout.getGlobalVisibleRect(rectangle);
params.y = rectangle.top;
- // Add a holder for the title bar. It is a FrameLayout, which
- // allows it to have an overlay shadow. It also has a white
- // background, which is the same as the background when it is
- // placed in a WebView.
+ // Add a holder for the title bar. It also holds a shadow to show
+ // below the title bar.
if (mFakeTitleBarHolder == null) {
mFakeTitleBarHolder = (ViewGroup) LayoutInflater.from(this)
.inflate(R.layout.title_bar_bg, null);
}
- mFakeTitleBarHolder.addView(mFakeTitleBar, mFakeTitleBarParams);
+ mFakeTitleBarHolder.addView(mFakeTitleBar, 0, mFakeTitleBarParams);
manager.addView(mFakeTitleBarHolder, params);
}
}