I create webview in code. In this webview I show pictures. Now I have two questions. How I can show image in full size, because my pictures has resolution 1381×1829 and I see only part of this picture. And second. As you can see in code I load pictures from assets, but I want to load pictures from sd card. How I can do that?
This is code:
WebView web = new WebView(getContext());
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setBuiltInZoomControls(true);
web.loadUrl("file:///android_asset/lj.png");
addView(web);
This method
webview.getSettings().setBuiltInZoomControls(true)will let you implement build in zoom control for non-multitletouch screenYou can load image from anywhere from sdcard to webview using this code.
That is if u want to load multiple image from multiple location.
But if u want to load images exist under the same parent folder, this will do the trick
BE WARN, if u try to load hi-res image like 1600×1840 to webview, webview WILL reduced image res to maintain memory usage, which result in BAD looking image