Titanium JIRA Archive
Alloy (ALOY)

[ALOY-648] Allow ListViewAnimationProperties to be passed to functions while data binding

GitHub Issuen/a
Resolution Date2013-05-01T22:36:29.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 09
ComponentsModels, Titanium SDK, XML
ReporterTony Lukasavage


Currently when data binding with a ListSection as per ALOY-609, the code for adding items to the sections is totally generated by Alloy. Unfortunately as the ListView API is written, it requires that the iOS animation properties of the ListView be passed into any given item insertion or deletion function, it is not set at the ListView level. To facilitate this, Alloy needs some way to expose to developers a means to set these properties on a per-UI-update basis.
<ListSection id="section" dataCollection="info" dataFunction="loadData">
// Animation options for ListView are only supported on iOS...
if (OS_IOS) {
	// Add "opts" to the "dataFunction" function object. In this case, we'll be
	// adding "animation" options that will be used by the ListView's generated
	// data binding code to make sure our ListItems don't animate when 
	// updated.
	// TODO: There's a Titanium bug where ListItems still animate when using
	//       the ListSection.setItems() function. When TIMOB-13737 is resolved,
	//       this will work as expected and the ListItems won't animate when
	//       they are added.
	loadData.opts = {
		animation: {
			animated: false


  1. Tony Lukasavage 2013-05-01

    This issue is relevant to iOS platform only as it is the only one that supports the animation object being passed to the ListView: http://docs.appcelerator.com/titanium/latest/#!/api/ListViewAnimationProperties *DISCLAIMER*: This is actual unverifiable until the ticket I logged, TIMOB-13737, is resolved. That ticket deals with the fact that ListSection.setItems() does not respect the animation object passed to it as its second argument. So I can confirm that the object gets constructed and passed to setItems() as expected, but since this functionality is broken at the Titanium level, there's no way to totally verify for now. PR: https://github.com/appcelerator/alloy/pull/126 test case: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-648 During functional testing, only when TIMOB-13737 is resolved, the items should appear on the listview when the button is clicked, but they should not be animated on. To be sure of the behavior, run once with the section wrapped in the OS_IOS conditional, then once with it. You should notice without the OS_IOS conditional block that the items animate when added. With the conditional block they should not animate when added.
  2. Federico Casali 2013-07-29

    Verification blocked by TIMOB-13737

JSON Source