[TIMOB-25376] Android:List item is not rendering properly with 6.2.X and above
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-12T18:14:15.000+0000 |
Affected Version/s | Release 6.2.2 |
Fix Version/s | Release 6.3.0 |
Components | Android |
Labels | android, listview, qe-6.3.0 |
Reporter | Aminul Islam |
Assignee | Joshua Quick |
Created | 2017-10-09T16:27:41.000+0000 |
Updated | 2017-10-20T17:07:34.000+0000 |
Description
Hi,
In our app we have a list view where list template consists of views, labels. On scroll of list view , list item is not rendering properly(a view is occupying entire list view width and height).
It is working fine with 6.1.2 GA whereas we are having this issue with 6.2.X SDK. Even tried with 6.3.0.v20170929040536 but having the same issue.
Note: It is an issue with Android.
Test Code
var win = Ti.UI.createWindow({
width : Ti.UI.FILL,
height : Ti.UI.FILL,
backgroundColor : 'black'
});
var listWithNetworkTemplate = {
childTemplates : [{// AddressView
type : 'Ti.UI.View',
bindId : 'addressView',
properties : {
layout : 'vertical',
left : 8,
width : '84%',
touchEnabled : false,
height : Ti.UI.SIZE,
top : 10
},
childTemplates : [{// Title
type : 'Ti.UI.Label',
bindId : 'title',
properties : {
color : 'black',
touchEnabled : false,
left : 5
}
}, {// netWorkView
type : 'Ti.UI.View',
bindId : 'netWorkView',
properties : {
width : Ti.UI.SIZE,
height : Ti.UI.SIZE,
left : 5,
bottom : 2,
top : 2,
borderWidth : 1,
borderColor : '#00AFD8',
touchEnabled : false
},
childTemplates : [{
// Image NetWork
type : 'Ti.UI.Label',
bindId : 'networkImage',
properties : {
color : '#00AFD8',
touchEnabled : false,
width : Ti.UI.SIZE,
height : Ti.UI.SIZE,
top : 2,
bottom : 2,
left : 6,
right : 6
}
}]
}, {// subTitle
type : 'Ti.UI.Label',
bindId : 'subTitle',
properties : {
touchEnabled : false,
color : 'blue',
left : 5,
bottom : 10
}
}]
}]
};
var listTemplates = {
'listWithNetworkTemplate' : listWithNetworkTemplate,
};
function createListViewItems(data) {
var listItems = [];
for (var i = 0,
j = 15; i < j; i++) {
listItems.push({
template : 'listWithNetworkTemplate',
title : {
text : "title"
},
subTitle : {
text : "distance",
},
viewProfile : {
text : "VIEW_PROFILE" + '\n'
},
networkImage : {
text : "NETWORK PROVIDER"
},
properties : {
height : Ti.UI.SIZE,
backgroundColor : 'white'
}
});
}
return listItems;
}
var tableItems = createListViewItems();
var tableSection = Ti.UI.createListSection({
items : tableItems
});
var table = Ti.UI.createListView({
templates : listTemplates,
footerDividersEnabled : true,
separatorColor : 'blue',
defaultItemTemplate : 'listWithNetworkTemplate',
sections : [tableSection]
});
win.add(table);
win.open();
Steps to reproduce:
1. Run the attached app on Android device
2.Scroll the list view
Thanks
Attachments
File | Date | Size |
---|---|---|
0-sa-d1-d2012903e81dae4be49e96a4c642b49e.jpg | 2017-10-09T16:29:06.000+0000 | 80172 |
0-sa-d4-a61a0fb98f222c8439c0d821051a02b7.jpg | 2017-10-09T16:29:06.000+0000 | 38147 |
I believe this is the very same problem as the ticket I just linked.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/9517 PR (6.3.x): https://github.com/appcelerator/titanium_mobile/pull/9518
FR passed for both PR's. Merged backport PR, waiting for merge button to be enabled to merge master PR.
Verified ticket List items are now rendered correctly. ENV: {noformat} macOS High Sierra 10.13 Nexus 5X(6.0.1) Google Pixel Xl (8.0) android emulator (4.4.2, 6.0) Ti SDK: 6.3.0.v20171018084007 Appc NPM: 4.2.10-2 App CLI: 6.3.0-master.15 Node v6.11.4 {noformat} *Closing Ticket.*