[TIMOB-28557] Android: ListView visibility change may not display items
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-10-20T02:46:44.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 10.2.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Gary Mathews |
| Assignee | Gary Mathews |
| Created | 2021-10-15T18:30:50.000+0000 |
| Updated | 2021-10-20T02:46:44.000+0000 |
Description
-
ListView.show() and ListView.visibility may not display list items under certain criterias
*TEST CASE*
const window = Ti.UI.createWindow();
const listView = Ti.UI.createListView({
visible: false, // Set visible equal to true and I work
searchView: Ti.UI.createSearchBar() // Remove the searchView and I work
});
// Comment out the event listener and I work, change me to 'click' and still broke though
window.addEventListener('open', () => {
const data = []
for (let i = 0; i < 5; i++) {
const row = {
properties: {
title: Foo ${i},
color: "#000000",
backgroundColor: "#FFFFFF",
height: 50
}
}
const section = Ti.UI.createListSection({
headerTitle: Test ${i},
items: [ row ]
});
data.push(section);
}
listView.sections = data;
// listView.visibility = true;
listView.show();
});
window.add(listView)
window.open();
master: https://github.com/appcelerator/titanium_mobile/pull/13124