I am facing a problem to set the side of webpage loaded in android webview.
problem is when i load the login page of the website it gets fitted absolutely well in the webview but wen i click on the hyperlink for new signup then the next page(registration page) loads with 100% scale in the browser and shows horizontal and vertical scroll bars. i want to fit this registration page according to device width.
how to do this please help me
tried almost all option available in stackoverflow n google
Also tell me how to access the SQL database(save and retrieve information from database) on android device which is operating the website
The code i used is :
Java file :
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);
String usrUrl = "http://" + txturl.getText().toString();
mWebView.setInitialScale(30);
//mWebView.setMinimumHeight(70);
//mWebView.setMinimumWidth(30);
mWebView.getSettings().setSupportMultipleWindows(true);
mWebView.getSettings().setUseWideViewPort(true);
//mWebView.setWebViewClient(mWebView.set)
//mWebView.setWebViewClient(clbk.shouldOverrideUrlLoading(mWebView, usrUrl));
//mWebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
mWebView.loadUrl(usrUrl);
In Manifest file :
<meta name="viewport" content="target-densitydpi=device-dpi, width=240px" />