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
Hello Young, Can you please send us your full list view file for testing? Thanks
Here you go:
Hi Mostafizur, Is this what you needed? Cheers.
Hi Ingo, Could we have this one fixed in the coming release? Has been over 4 months now. Thanks.
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
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