Hi again,
@Mahtias Lin, please see my code to create and use WebView;
WebView webView = new WebView(this);
RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, 416);
WebSettings webSettings = webView.getSettings();
webSettings.setSavePassword(false);
webSettings.setSaveFormData(false);
webSettings.setJavaScriptEnabled(true);
webView.setLayoutParams(p);
webView.loadUrl("http://www.google.com/");
Above code is not set my webview to 416px height.
@CommonsWare, I tried your suggested with following code and amazingly it works, thanks.
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return false;
}
});
But this usage brought some new problems. When I override shouldOverrideURLLoading, the webview displays with no-addressbar, no-navigation (back, forward etc...)?
And also, the webview doenst accept user inputs?
Ok, I am editing my question :)
I searched and I found the following additional set to make webview to able to get inputs;
webView.requestFocus(View.FOCUS_DOWN);
On the other hand, I guess I will create my own back, forward buttons and address-bar for my webview. I will also attach "what happened" to this thread when I create my buttons and address-bar.
Best,