the ListView row is incorrectly sized leading to all text in the view not being shown
const win = Ti.UI.createWindow();
const template = {
childTemplates: [
{
type: 'Ti.UI.View',
properties: { layout: 'horizontal', height: Ti.UI.SIZE, backgroundColor: 'blue' },
childTemplates: [
{
type: 'Ti.UI.View',
properties: { layout: 'vertical', height: Ti.UI.SIZE, backgroundColor: 'yellow', left: 0, width: 120 },
childTemplates: [
{
type: 'Ti.UI.Label',
bindId: 'startTime',
properties: { color: 'green', textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
},
{
type: 'Ti.UI.Label',
bindId: 'endTime',
properties: { color: 'red', textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
}
]
},
{
type: 'Ti.UI.View',
properties: { layout: 'horizontal', height: Ti.UI.SIZE, backgroundColor: 'green', width: Ti.UI.FILL },
childTemplates: [
{
type: 'Ti.UI.Label',
bindId: 'title',
properties: { left: 5, color: 'red', right: 30 }
},
{
type: 'Ti.UI.Label',
bindId: 'detail',
properties: { right: 0, color: 'purple', font: { fontWeight: 'bold' } }
}
]
},
]
}
]
};
const section = Ti.UI.createListSection({
headerTitle: 'Example',
items: [{
startTime: { text: '10:50' },
endTime: { text: '11:50' },
title: { text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean interdum laoreet augue, scelerisque convallis dui bibendum vel. Nullam lacinia, odio ac placerat rhoncus, turpis ante venenatis nisi, sit amet auctor quam metus sed erat. Aliquam urna justo, pulvinar fermentum egestas ac, posuere non lectus. ' },
detail: { text: 'This text should show at the bottom' }
}]
});
win.add(Ti.UI.createListView({
templates: { 'mytemplate': template },
defaultItemTemplate: 'mytemplate',
sections: [section],
style: Titanium.UI.iOS.TableViewStyle.INSET_GROUPED
}));
win.open();
1. Add the code above to an existing app.js
2. Build to an iOS device or simulator
PR - https://github.com/appcelerator/titanium_mobile/pull/12419
FR Passed. Waiting for Jenkins build
PR merged to master and 9_3_X