0
	 * @param margin 
	 *            - Margin around the web view. 
	 */ 
	private void setUpWebView(final int margin) {
		final LinearLayout webViewContainer = new LinearLayout(getContext());
		mWebView = new WebView(getContext());
		mWebView.setVerticalScrollBarEnabled(false);
		mWebView.setHorizontalScrollBarEnabled(false);
		mWebView.setWebViewClient(new InstagramAuthDialog.IgWebViewClient());
		mWebView.getSettings().setJavaScriptEnabled(true);
		mWebView.getSettings().setSavePassword(false);
		final String url = format(AUTH_URI, mClientId, REDIRECT_URI,
				mPermissions);
		mWebView.loadUrl(url);
		mWebView.setLayoutParams(FILL);
		mWebView.setVisibility(View.INVISIBLE);
 
		webViewContainer.addView(mWebView);
		mContent.addView(webViewContainer);
	} 
 
Contextual code suggestions in your IDE  Get Codota for Java