Tab switcher animation
Bug: 5123884
first step towards animations between browser and tab switcher
Change-Id: I1d959d42d0036f3c4498972fcc8ad434fa7f4437
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.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 @@
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 @@
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();