Reputation: 5197
My code is affective when the user is accessing the pages by clicking a link.
But when the user press Back Button
content won't fit :(
This is my current code for pressing Back Button
if(keyCode == KeyEvent.KEYCODE_BACK){
WebView myWebView = (WebView)findViewById(R.id.webView1);
myWebView.getSettings().setSupportZoom(true);
myWebView.getSettings().setLoadWithOverviewMode(true);
myWebView.getSettings().setUseWideViewPort(true);
myWebView.goBack();
}
How can I solve?
Upvotes: 0
Views: 101
Reputation: 4728
If your website text is being wrapped, use:
webView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.NORMAL)
or
webView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN)
Upvotes: 1