[TIMOB-23646] Android: Button source missing properties on bubbleParent event.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-04-20T17:46:45.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | android, bubbleParent, button, events, listview, merge-6.1.0 |
Reporter | Lorenzo Piccinini |
Assignee | Gary Mathews |
Created | 2016-07-03T09:02:50.000+0000 |
Updated | 2017-05-16T18:19:42.000+0000 |
Description
I have listview with button inside the items. I have set a click event function but it don't return custom button's properties. In iOS it works fine.
var item = {
properties : {
accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE,
backgroundColor: '#fff',
width: Ti.UI.FILL,
height : Ti.UI.SIZE
},
events: {
click: eventFunction
},
childTemplates : [
{
type : 'Ti.UI.Button',
bindId : 'bindButton',
properties : {
width: 70,
height: 70,
image: "/images/user_icon.png",
borderRadius: 35,
borderWidth: 1,
borderColor: '#dedede',
zIndex: 1,
backgroundColor: 'transparent',
customProperty1 : 10,
customProperty2 : 10
},
},
{
type : 'Ti.UI.Button',
bindId : 'bindButton2',
properties : {
width: 70,
height: 70,
image: "/images/user_icon.png",
borderRadius: 35,
borderWidth: 1,
borderColor: '#dedede',
zIndex: 1,
backgroundColor: 'transparent',
customProperty1 : 20,
customProperty2 : 20
}
}
]
}
function eventFunction(e){
var customProperty1 = e.source.customProperty1;
};
When I click on button in eventFunction I expect to find e.source.customProperty1 but e.source don't contain it. Why? In iOS I find the properties as expected. I have tried moving events param inside the button template but the result is the same.
Is it a bug?
Hello, We need a full reproducible code.
Copy and paste in your app.js. Look the difference between iOS and Android by clicking on buttons. In android you will not get customProperty by click event.
Any news about it? I think it is important bug.
Is there any news about this problem ?
This could potentially be fixed by https://github.com/appcelerator/titanium_mobile/pull/8557
Just tested the sample code on ti sdk 6.1.0.v20161129163215 but the problem still persist. it's not fixed by that PR.
Is there any news about this problem ? I don't know how to solve this problem! Is there any work around? I don't how it is possibile, I think is a basic functionality to manage interactive listview.
master: https://github.com/appcelerator/titanium_mobile/pull/8729
FR passed. Master PR merged. [~gmathews], waiting for 6.1.0 backport.
[~lchoudhary] 6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9035
FR Passed for backport.
Closing this ticket. The changes are seen in these builds, installed from the CLI: 6.1.0.v20170516103606 6.2.0.v20170515114643