Code example for FrameLayout

Methods: addView, getHeight, getWidth

0
 
				WebView webView = new WebView(context);
				webView.setWebViewClient(new TwitterWebViewClient(listener));
 
				//WebView90%:ToolBar10%のビューを作成します. 
				base.addView(webView, new LayoutParams((int) root.getWidth(),
						(int) (root.getHeight() * 0.9)));
				base.addView(toolbar, new LayoutParams((int) root.getWidth(),
						(int) (root.getHeight() * 0.1)));
 
				root.addView(base);
 
				//下から上に競り上がるアニメーション.0.4s 
				TranslateAnimation anim = new TranslateAnimation(0, 0, root
						.getHeight(), 0);
				anim.setDuration(400);
				base.startAnimation(anim);
 
				webView.loadUrl(authUrl);
			}