[TIMOB-5329] Android: images in a project do not show correctly in a webView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2016-08-22T17:23:47.000+0000 |
Affected Version/s | Release 1.8.0 |
Fix Version/s | n/a |
Components | Android |
Labels | 2.1, Android, image, webview |
Reporter | Alan Vaghti |
Assignee | Ingo Muschenetz |
Created | 2011-09-21T13:29:00.000+0000 |
Updated | 2017-03-16T21:37:50.000+0000 |
Description
Step 1: Add the attached image (checked.png) to your project
Step 2: Run the app below
Step 3: Notice the image in the webview does not display properly
Notes: Image is displayed properly with Google API's 2.2 and 2.3.3 as well as a Nexus One running 2.2.2. It seems that this is a 2.1 issue.
Issue is related to TIMOB-4750
var win = Titanium.UI.createWindow({});
var iv = Ti.UI.createImageView({
image: 'checked.png',
top: 100
});
var webview = Titanium.UI.createWebView({
html: '<html><body><img src="checked.png"></body></html>',
});
win.add(webview);
win.add(iv);
win.open();
Attachments
File | Date | Size |
---|---|---|
checked.png | 2011-09-21T13:29:00.000+0000 | 31579 |
correct.png | 2011-09-21T13:29:00.000+0000 | 43503 |
Google APIs 2_1update1.png | 2011-09-21T13:29:00.000+0000 | 38540 |
It appears to work using Titanium SDK master (currently 6.1.0) and an Android 6.0 (API 23) emulator. For a best practice, you should set a
width
andheight
on the HTML<img>
tag and then I'm sure it will work as expected.Closing ticket as the issue cannot be reproduced.