Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5329] Android: images in a project do not show correctly in a webView

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-08-22T17:23:47.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sn/a
ComponentsAndroid
Labels2.1, Android, image, webview
ReporterAlan Vaghti
AssigneeIngo Muschenetz
Created2011-09-21T13:29:00.000+0000
Updated2017-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

FileDateSize
checked.png2011-09-21T13:29:00.000+000031579
correct.png2011-09-21T13:29:00.000+000043503
Google APIs 2_1update1.png2011-09-21T13:29:00.000+000038540

Comments

  1. Chris Barber 2016-08-22

    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 and height on the HTML <img> tag and then I'm sure it will work as expected.
  2. Lee Morris 2017-03-16

    Closing ticket as the issue cannot be reproduced.

JSON Source