How to make the webview of an android application full screen. I have added the webview on a layout xml file but it doesn\'t stretches out till the edges of the layout, ther
From above code remove padding tags -
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
It will do the job and also be sure to remove the HTML's margins/padding which you are rendering into the WebView that might contain those tags which leaves some space.
You can set dimensions in dimens.xml found in res/values folder. By default it is 16dp. So can set it accordingly.

From the docs https://developer.android.com/guide/webapps/webview.html
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding)
https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html
Put webview in to dialog popup window.
WebView webview = new WebView(this/*put your activity object*/);
webview.getSettings().setLoadWithOverviewMode(true);
webview.getSettings().setUseWideViewPort(false);
webview.getSettings().setSupportZoom(false);
webview.getSettings().setJavaScriptEnabled(true);
webview.setBackgroundColor(Color.TRANSPARENT);
webview.loadUrl("http://www.awwwards.com/websites/responsive-design/");
RelativeLayout.LayoutParams paramsWebView = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
Dialog dialog = new Dialog(this/*put your activity object*/, android.R.style.Theme_Black_NoTitleBar_Fullscreen);
dialog.addContentView(webview, paramsWebView);
dialog.show();
You should change the relative layout settings. And remove padding settings, if any on webview on XML file.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:id="@+id/frame">
Just add (or change) the activity's android:theme attribute with following line in AndroidManifest.xml file
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"