var win = Ti.UI.createWindow(),
items = [],
template = {
properties: {
accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE,
backgroundColor: 'white',
height: Ti.UI.SIZE,
layout: 'horizontal'
},
events: {
click: function(e) {
alert(e.source.customProperty);
}
},
childTemplates:
[
{
type: 'Ti.UI.Button',
bindId: 'bindButton',
properties: {
left: 10,
width: 100,
height: 40,
borderRadius: 20,
borderWidth: 1,
borderColor: '#dedede',
backgroundColor: 'green'
},
},
{
type : 'Ti.UI.Button',
bindId : 'bindButton2',
properties : {
right: 10,
width: 100,
height: 40,
borderRadius: 20,
borderWidth: 1,
borderColor: '#dedede',
backgroundColor: 'red'
}
}
]
},
listView = Ti.UI.createListView({templates: {'template': template}}),
section = Ti.UI.createListSection();
for(var i = 1; i <= 10; i++){
items.push({
template: 'template',
bindButton: {
title: 'button a ' + i,
customProperty: i
},
bindButton2: {
title: 'button b ' + i,
customProperty: i
},
properties: {
itemId: i
}
});
}
section.setItems(items);
listView.sections = [section];
win.add(listView);
win.open();
master: https://github.com/appcelerator/titanium_mobile/pull/8730
Verified fixed in 6.1.0.v20170222102258. Test information available in https://github.com/appcelerator/titanium_mobile/pull/8730
I send PR after solving this problem. https://github.com/appcelerator/titanium_mobile/pull/9073
I send PR after solving this problem. https://github.com/appcelerator/titanium_mobile/pull/9073
During test, please ensure you review AC-4976
PR for 6.1.0: https://github.com/appcelerator/titanium_mobile/pull/9076
FR passed for backport PR.
I think this patch broke this code:
with 6.0.4.GA it worked fine (displaying 10 circles). But in 6.1.0.GA I have to set
left:0
now to get my circles to display. With justright:3
it won't work anymoreFor everyone's reference, the issue [~michael] mentioned is being handled in TIMOB-24792. [~michael], we plan on fixing this in v6.1.1 to be made available soon. Sorry about the inconvenience. We're adding more layout tests on our end to help avoid these issues in the future.
Thank you for the feedback! Since there is a workaround (setting the other position to 0) it can be fixed when updating (or I just wait for 6.1.1 :) ). Didn't spot that in the RC, so next time I'll do some more beta testing too!