Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15551] Android: ListView - ImageView with images[] array does not animate

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-06T19:53:48.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 05 API, Release 3.3.0
ComponentsAndroid
LabelsSupportTeam, module_imageview, qe-closed-3.3.0, qe-testadded, triage
ReporterMostafizur Rahman
AssigneeSunila
Created2013-10-03T20:19:27.000+0000
Updated2015-12-14T14:08:56.000+0000

Description

Problem Description

ImageView with images in listView item cannot start animation on event. But it’s working well in IOS. If I use single imageView with images property then its animate good with event fire.

Test Environments

OS: MAC OX X 10.8.5 Ti SDK: 3.1.2 GA, 3.1.3 GA Ti CLI: 3.2.0 Simulator 7.0 Android Emulator with Android SDK 2.3.3 Android Device

Test Code

index.xml

<Alloy>
	<Window title="List View" class="container">
		<ListView id="list" defaultItemTemplate="bigCard" separatorColor="transparent">
			<Templates>
				<ItemTemplate name="bigCard" height="110dp">
					<ImageView bindId="spinner" class="spinner" onLoad="startAnimate" />
				</ItemTemplate>
			</Templates>
			<ListSection >
				<ListItem    />
			</ListSection>
		</ListView>
		 
	</Window>
</Alloy>
index.js
function startAnimate(e) {
	Ti.API.info('clciked!');
	e.source.start();
}

$.index.open();

index.jss






".spinner": {backgroundColor: 'red', images: [ "/images/apple.png", "/images/arrow-up.png", "/images/arrow-down.png" ], },

Step to reproduce

1. Run IOS Simulator 2. Run on Android Emulator/Device 3. Compare both results

Expected Result

Images are animating for both OS

Output Result.

IOS working good but not working in Android

Comments

  1. Mostafizur Rahman 2013-10-13

    Hello Young, Can you please send us your full list view file for testing? Thanks
  2. Young 2013-10-19

    Here you go:
       <Alloy>
       	<Window title="List View">
       		<ListView id="list" defaultItemTemplate="template1" separatorColor="transparent">
       			<Templates>
       				<ItemTemplate name="bigCard" height="210dp">
       					<ImageView bindId="card" id="card1" onChange="doChange"/>
       					<ImageView id="spinner" class="spinner" onLoad="startAnimate"/>
       					<Label bindId="tagLabel" id="label1"/>
       				</ItemTemplate>
       				<ItemTemplate name="smallCard" height="80dp">
       					<ImageView bindId="card" id="card2"/>
       					<Label bindId="tagLabel" id="label2"/>
       				</ItemTemplate>
       			</Templates>
       		</ListView>
       	</Window>
       </Alloy>
       
  3. Young 2013-10-21

    Hi Mostafizur, Is this what you needed? Cheers.
  4. Young 2014-01-27

    Hi Ingo, Could we have this one fixed in the coming release? Has been over 4 months now. Thanks.
  5. Sunila 2014-02-28

    Make sure that the view is set in the proxy so that new view is not created when start is called on the ImageViewProxy. https://github.com/appcelerator/titanium_mobile/pull/5396
  6. Paras Mishra 2014-04-28

    Issue is not reproducible on android any more. Verified the fix on: Device : Google Nexus 4, Android Version: 4.1.1 SDK: 3.3.0.v20140425191906 CLI version : 3.3.0-dev OS : MAC OSX 10.9.2 Alloy: 1.4.0-dev ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.3.0.201404251359 titanium-code-processor: 1.1.1-alpha XCode : 5.1.1

JSON Source