android - Webview: How to zoom up to 100x? -


in webview have image in high resolution ( 9000x5000px ). there way zoom in in webview 100x ?

i have used code, allows me zoom 10x:

// enable zoom mywebview.getsettings().setbuiltinzoomcontrols(true); mywebview.getsettings().setsupportzoom(true); 

try this, might works you.

// set activity's content view single webview test webview mwebview = new webview(this); setcontentview(mwebview);  // retrieve zoommanager webview class<?> webviewclass = mwebview.getclass(); field mzoommanagerfield = webviewclass.getdeclaredfield("mzoommanager"); mzoommanagerfield.setaccessible(true); object mzoommanagerinstance = mzoommanagerfield.get(mwebview);  // modify "default max zoom scale" value, controls upper limit // , set large; e.g. float.max_value class<?> zoommanagerclass = class.forname("android.webkit.zoommanager"); field mdefaultmaxzoomscalefield = zoommanagerclass.getdeclaredfield("mdefaultmaxzoomscale"); mdefaultmaxzoomscalefield.setaccessible(true); mdefaultmaxzoomscalefield.set(mzoommanagerinstance, float.max_value); 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -