summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/NavTabView.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-08-09 10:24:41 -0700
committerMichael Kolb <kolby@google.com>2011-08-15 13:31:03 -0700
commitc3af06776be83ba64a0d3549cb72ca6e5e7f03cd (patch)
tree60d1a15205ac0b46f94528c0da0963a79f6d547e /src/com/android/browser/NavTabView.java
parent8d5af2d0208aa5b5197f50e12ba11c5565d74dc4 (diff)
downloadpackages_apps_Browser-c3af06776be83ba64a0d3549cb72ca6e5e7f03cd.zip
packages_apps_Browser-c3af06776be83ba64a0d3549cb72ca6e5e7f03cd.tar.gz
packages_apps_Browser-c3af06776be83ba64a0d3549cb72ca6e5e7f03cd.tar.bz2
Tab switcher animation
Bug: 5123884 first step towards animations between browser and tab switcher Change-Id: I1d959d42d0036f3c4498972fcc8ad434fa7f4437
Diffstat (limited to 'src/com/android/browser/NavTabView.java')
-rw-r--r--src/com/android/browser/NavTabView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/browser/NavTabView.java b/src/com/android/browser/NavTabView.java
index ed6b63d..07ac164 100644
--- a/src/com/android/browser/NavTabView.java
+++ b/src/com/android/browser/NavTabView.java
@@ -21,12 +21,15 @@ import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewGroup;
+import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
public class NavTabView extends LinearLayout {
+ private ViewGroup mContent;
private Tab mTab;
private ImageView mClose;
private TextView mTitle;
@@ -52,6 +55,7 @@ public class NavTabView extends LinearLayout {
private void init() {
LayoutInflater.from(mContext).inflate(R.layout.nav_tab_view, this);
+ mContent = (ViewGroup) findViewById(R.id.main);
mClose = (ImageView) findViewById(R.id.closetab);
mTitle = (TextView) findViewById(R.id.title);
mTitleBar = findViewById(R.id.titlebar);
@@ -92,7 +96,11 @@ public class NavTabView extends LinearLayout {
return mHighlighted;
}
- protected void setWebView(PhoneUi ui, Tab tab) {
+ protected void setWebView(WebView w) {
+ mContent.addView(w, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
+ }
+
+ protected void setWebView(Tab tab) {
mTab = tab;
setTitle();
Bitmap image = tab.getScreenshot();