Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18275] Android: 'Images' property for imageView does not work

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2014-12-22T23:35:35.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsAndroid
Labelsqe-3.5.0
ReporterLokesh Choudhary
AssigneeIngo Muschenetz
Created2014-12-20T00:30:51.000+0000
Updated2014-12-22T23:35:39.000+0000

Description

This is not a regression. This issue is reproducible with SDK 3.4.1.GA as well.

Description:

1. Use the code below in your app.js:
Titanium.UI.setBackgroundColor('#000');
 
var win2 = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#fff'
});
 
var image2 = Titanium.UI.createImageView({
  top: 30,
  images: ['KS_nav_ui.png','KS_nav_ui.png']
});

win2.add(image2);
 
win2.open();
OR
Titanium.UI.setBackgroundColor('#000');
 
var win2 = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#fff'
});
 
var image1 = Titanium.UI.createImageView({
  top: 10,
  image: "/appicon.png"
});
 
var icon = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'appicon.png');
var dest = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'appicon.png');
 
dest.write(icon.read());
 
var image2 = Titanium.UI.createImageView({
  bottom: 10,
  images: [Ti.Filesystem.applicationDataDirectory  + 'appicon.png',Ti.Filesystem.applicationDataDirectory  + 'appicon.png',Ti.Filesystem.applicationDataDirectory  + 'appicon.png']
});
 
win2.add(image1);
win2.add(image2);
 
win2.open();
2. Build & run on an android device.

Actual Result:

1. We do not see the images specified in the array for the 'images' property. 2. This issue is seen for strings, remote URL's & Titanium.Filesystem.Files.

Expected Result:

1. We should see the images specified in the array for the 'images' property.

Comments

  1. Wilson Luu 2014-12-22

    Verified that you will need to call the ImageView.start() method in order to view the animation on the window. Tested on: Appcelerator Studio, build: 3.4.1.201410281743 SDK build: 3.5.0.v20141222103320, 3.4.1.GA CLI: 3.4.1 Alloy: 1.5.1 Xcode: 6.2 beta 3 Devices: Samsung Galaxy S4 (4.4.4)
  2. Eric Merriman 2014-12-22

    Closing as invalid

JSON Source