summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BaseUi.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/BaseUi.java')
-rw-r--r--src/com/android/browser/BaseUi.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index bb44336..e3f5986 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -91,6 +91,7 @@ public abstract class BaseUi implements UI {
protected FrameLayout mContentView;
protected FrameLayout mCustomViewContainer;
protected FrameLayout mFullscreenContainer;
+ private FrameLayout mFixedTitlebarContainer;
private View mCustomView;
private WebChromeClient.CustomViewCallback mCustomViewCallback;
@@ -126,6 +127,8 @@ public abstract class BaseUi implements UI {
.getDecorView().findViewById(android.R.id.content);
LayoutInflater.from(mActivity)
.inflate(R.layout.custom_screen, frameLayout);
+ mFixedTitlebarContainer = (FrameLayout) frameLayout.findViewById(
+ R.id.fixed_titlebar_container);
mContentView = (FrameLayout) frameLayout.findViewById(
R.id.main_content);
mCustomViewContainer = (FrameLayout) frameLayout.findViewById(
@@ -844,4 +847,17 @@ public abstract class BaseUi implements UI {
}
}
+
+ public void addFixedTitleBar(View view) {
+ mFixedTitlebarContainer.addView(view);
+ }
+
+ public void setContentViewMarginTop(int margin) {
+ LinearLayout.LayoutParams params =
+ (LinearLayout.LayoutParams) mContentView.getLayoutParams();
+ if (params.topMargin != margin) {
+ params.topMargin = margin;
+ mContentView.setLayoutParams(params);
+ }
+ }
}