Loading an image into WebView not rendering properly on Android
I am trying to load an image into a WebView in order to allow the user to move it around the screen and do a pinch-zoom on their device. This has worked fine on the iPhone however it seems to fail fairly miserably much of the time on the Android emulator. I have tried re-saving the failing images as PNG's and Jpegs with different colour profiles / DPI settings but to no avail - the output is always like the screenshot here -> [http://imgur.com/lBRQt]
Here is the basic code I'm using, if anyone has any ideas that would be a great help!
var webview = Titanium.UI.createWebView({
visible: true,
top: 35,
height: 445,
width: 320
});
webview.url = './smaller/foto18.jpg';
1 Answer
-
Worked it out, turns out that it can't handle filenames that contains spaces or some other characters (such as brackets or comma's). Just batch renaming the images to remove these characters in the filename seems to work.