Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24849] Android: Fix ListView items border properties #9159

Merged
merged 3 commits into from Jun 30, 2017

Conversation

garymathews
Copy link
Contributor

  • Fix the setting of border properties
  • invalidate the borderView before rendering
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();

JIRA Ticket

@garymathews garymathews added this to the 6.2.0 milestone Jun 19, 2017
@garymathews garymathews requested a review from ypbnv June 19, 2017 19:49
Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

Copy link
Contributor

@longton95 longton95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR passed.

Tested using the test case above and a modified version, ListView items with a border now render correctly and do not change when scrolling fast.

ENV

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)

@longton95 longton95 merged commit 8b9d5ad into tidev:master Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants