I'd like to force my webview application in landscape ( largest mode), lock the aspect ratio so it'll always fill the screen, disable zoom ( when double tapping) & disable scrolling as well.
Here's what I've tried this far.
WebView b=(WebView)findViewById(R.id.webview);
b.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
b.setScrollbarFadingEnabled(false);
b.getSettings().setJavaScriptEnabled(true);
b.getSettings().setLoadWithOverviewMode(true);
b.getSettings().setUseWideViewPort(true);
b.getSettings().setBuiltInZoomControls(false);
b.setPadding(0,0,0,0);b.setInitialScale(getScale());
private int getScale(){
Display display=((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int width=display.getWidth();Double val=new Double(width)/new Double(800);
val=val*100d;return val.intValue();
}
Here's the rendering on my Galaxy note
Initial view: http://i.snag.gy/ol0Zh.jpg
View when double tapping on the screen ( the one I want as initial view): http://i.snag.gy/j6i3f.jpg