Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4750] Android: images in a project using fastDev do not show in a webView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-08-22T12:00:50.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-31, Release 1.8.0
ComponentsAndroid
Labelsn/a
ReporterJon Alter
AssigneeVikramjeet Singh
Created2011-07-22T11:09:14.000+0000
Updated2014-06-19T12:46:29.000+0000

Description

Step 0: Make sure fastDev is enabled Step 1: Add an image to your project (don't point to appicon.png, add another image) Step 2: Run the app below Step 3: Notice the image in the webview does not display
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();

Workaround

After you add images to your project, disable fastdev and build it once, and the reenable fastdev.

Associated Helpdesk Ticket

http://appc.me/c/APP-777584

Comments

  1. Jon Alter 2011-07-27

    Associated Helpdesk Ticket

    http://appc.me/c/APP-188154

    Another Repro Case

    Image does not display. Reproduced this with: Windows 7, TiSDK 1.7.2, Android Emulator 2.1 ,FastDev enabled
       var win = Titanium.UI.createWindow({
         backgroundColor : '#fff'
       });
       win.open();
       
       var iv = Ti.UI.createImageView({
       	image: "default.png",
       	height: 50,
       	width: 50,
       	top: 20,
       	backgroundColor: 'blue'
       });
       win.add(iv);
       
  2. Marshall Culpepper 2011-08-22

    This was resolved in the same round of commits as TIMOB-3838
  3. Alan Vaghti 2011-09-21

    Fix verified in SDK 1.8.0v20110920000211 with Android emulators 2.1-update1, 2.2, and 2.3.3. 2.1-update was displaying the issue incorrectly. A new bug was written for that issue: TIMOB-5329

JSON Source