[TIMOB-16266] Android: ListView.sections is undefined
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-07T18:46:03.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2014 Sprint 05, 2014 Sprint 05 API, Release 3.3.0 |
Components | Android |
Labels | android, listsection, listview, qe-testadded, section |
Reporter | Pier Paolo Ramon |
Assignee | Sunila |
Created | 2014-01-20T21:25:44.000+0000 |
Updated | 2014-07-23T10:12:55.000+0000 |
Description
There's no way to access a ListView
sections
property. It will always returns undefined
.
var window = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var listView = Ti.UI.createListView({ });
window.add(listView);
var section = Ti.UI.createListSection({
items: [
{
properties: {
title: 'Hallo'
}
}
]
});
listView.appendSection(section);
function test() {
Ti.API.error(" >> " + listView.sections);
}
test();
setTimeout(test, 1e3);
Moving this ticket to engineering as I can reproduce this issue with the provided test case.
Actually, I discovered it’s simply not implemented :\
ListView.sections property is not marked as iOS only property so we may consider this ticket either as a Doc bug or as an Android feature request.
Exposed sections as a property and method. https://github.com/appcelerator/titanium_mobile/pull/5306
ListView.sections is returning ListSection Object, hence closing the issue. Verified the issue on: Tested on: Device : Google Nexus 5, Android Version: 4.4.2 SDK: 3.3.0.v20140417173316 CLI version : 3.2.3-alpha3 OS : MAC OSX 10.9.2 Alloy: 1.3.1 ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.2.3.201404151910 titanium-code-processor: 1.1.1-alpha XCode : 5.1.1