Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24849] Android: ListView items with border would not render correctly when scrolling

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-06-30T13:15:20.000+0000
Affected Version/sRelease 6.1.1
Fix Version/sRelease 6.2.0
ComponentsAndroid
Labelsqe-6.2.0
ReporterGary Mathews
AssigneeGary Mathews
Created2017-06-19T19:20:02.000+0000
Updated2017-06-30T14:13:53.000+0000

Description

- Sometimes items with borderWidth would not render correctly when scrolling fast down a ListView
var win = Ti.UI.createWindow({backgroundColor: 'gray'}),
    list = Ti.UI.createListView({
        templates: {
            template: {
                childTemplates: [
                    {
                        type: 'Ti.UI.View',
                        bindId: 'item',
                        properties: {
                            top: '5dp', bottom: '5dp',
                            width: '200dp', height: '50dp',
                            borderWidth: '8dp',
                            backgroundColor: 'green'
                        }
                    }
                ]
            }
        },
        defaultItemTemplate: 'template'
    }),
    section = Ti.UI.createListSection(),
    items = [];

for (var i = 0; i < 24; i++) {
    var colour = i % 2 ? 'green' : 'yellow';
    items.push({
        item: {
            backgroundColor: colour,
            borderColor: colour
        }
    });
}

section.setItems(items);
list.setSections([section]);

win.add(list);
win.open();

Comments

  1. Gary Mathews 2017-06-19

    master: https://github.com/appcelerator/titanium_mobile/pull/9159
  2. Josh Longton 2017-06-30

    {noformat} SDK Version : Local 6.2.0 Mac OS Version : 10.12.5 Appc CLI : 6.2.2 Appc NPM : 4.2.9 Node : v6.10.3 Device: Nexus 5x(6.0.1), Pixel XL(7.1.2) Emulator: (7.0), (6.0), (4.4.2) {noformat} Using above env passed FR. After merge, the changes are present in {6.2.0.v20170630062735}}. *Closing*

JSON Source