[TIMOB-10002] Android: Custom TableViewSection in ScrollableView crash
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-11T06:48:41.000+0000 |
Affected Version/s | Release 2.0.2 |
Fix Version/s | Release 3.0.2 |
Components | Android |
Labels | core |
Reporter | Sebastien |
Assignee | jithinpv |
Created | 2012-07-13T03:07:46.000+0000 |
Updated | 2017-03-27T18:13:44.000+0000 |
Description
If I put a tableview with custom tabelviewsection in a scrollableview, when I click on row and use addView method of scrollableView the application crashes.
Here sample of code to reproduce the issue :
App.js is attached.
(function() {
//create component instance
var self = Ti.UI.createWindow({ backgroundColor:'#ffffff', navBarHidden:true, exitOnClose:true });
var tableView = Ti.UI.createTableView();
var oneSection = Ti.UI.createTableViewSection({
headerView: Ti.UI.createView({ height: '25dp', backgroundColor: '#F00' })
});
for (var i=0; i < 20; i++) {
oneSection.add(Ti.UI.createTableViewRow({ title: 'coucou' + i, height: '40dp' }))
};
tableView.setData([oneSection]);
var scrollView = Ti.UI.createScrollableView({ views: [tableView] });
self.add(scrollView);
var secondView = Ti.UI.createView({ backgroundColor: '#F00' });
tableView.addEventListener('click', function(item) { // crash HERE !!!!!! scrollView.addView(secondView); scrollView.moveNext(); });
self.open();
})();
Attachments
Hi, Just to say, it's bug is not just for iOS. Regards, Seb
Filer has reported that this issue occurs for both iOS and Android platforms so we should test it on all platforms.
Crash on IOS is false. It crashes because of the moveNext() method which is documented as Android only. Setting this as an android issue
Attaching crash log from android device running 4.0.2
Crash is in tableView layout. Setting label to core
Issue does not reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4
Closing ticket as I am unable to reproduce this issue with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80