[TIMOB-20301] Memory lack using scrollableview and many buttons. Buttons event don't works.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2019-11-15T22:41:57.000+0000 |
Affected Version/s | Release 5.1.2 |
Fix Version/s | n/a |
Components | n/a |
Labels | 5.1.2, appcelerator, button, eventlistener, scrollableview |
Reporter | Lorenzo Piccinini |
Assignee | Unknown |
Created | 2016-01-30T16:30:19.000+0000 |
Updated | 2019-11-15T22:41:58.000+0000 |
Description
With sdk 5.1.2 I try the code in new project on iPad2 simulator without LiveView and it works fine but not in my real project. Now, in the new project, I have tried with 90 iterations and clicks works for first 18 buttons, in 5.1.1 works fine in all buttons.
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var data = [];
var c =1;
for(var i=1; i<=90; i++){
if (c == 1) {
var page_view = Ti.UI.createView({
layout: 'horizontal'
});
}
var view = Ti.UI.createView({
backgroundColor: 'green',
width : 250,
left: 5
});
var button = Ti.UI.createButton({
bottom : 10,
left : 10,
right : 10,
height : 40,
color : '#fff',
backgroundColor : 'red',
title : "click",
ids: i
});
view.add(button);
button.addEventListener('click', function(e) {
Ti.API.info('button: ' + e.source.ids);
});
page_view.add(view);
if (c % 3 == 0) {
data.push(page_view);
c = 1;
} else {
c++;
if (i == 90) {
data.push(page_view);
}
}
}
var scroll_view = Ti.UI.createScrollableView({
showPagingControl : true,
top : 130,
views: data,
layout: 'horizontal'
});
win.add(scroll_view);
http://stackoverflow.com/questions/35103130/multiple-buttons-dont-fire-clicks-event-5-1-2-memory-lack/35103813#35103813
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2016-01-31 at 11.36.07 AM.png | 2016-01-31T05:42:45.000+0000 | 309246 |
Hello, I tried your project, It's working fine with SDk 5.1.2.GA. The buttons event is firing as expected. See the attachment. My Environment
Thanks.
I have recorded video example. Download here http://smartappsdesign.com/Test.mov
Hello, Test on a real device. and make a video of the response. The issue is not reproducible from my end with SDK 5.1.2.GA. Thanks.
Yes, I confirm the problem on device too. http://smartappsdesign.com/TestDevice.m4v
Cannot reproduce. Closing. Axway Appcelerator Studio, build: 5.1.4.201909061933 macOS : 10.15 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.1 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.2.1.GA