Files
NativeScript/ui/list-view
Hristo Deshev 77838ae9c6 Change from "classic" TS 1.6 imports to the default resolution scheme.
- Use relative imports in place of most of our absolute ones.
- Add "private" ambient modules for modules that we need to import using
an absolute path (e.g. when app/.../test-something.ts needs to import
ui/styling/style-scope)
2015-09-29 16:25:49 +03:00
..
2015-08-27 13:26:15 +03:00
2015-03-03 10:34:40 +02:00

ListView module.

    var lm  = require("ui/label");
    var lvm = require("ui/list-view");

    var data = [];
    for(var i = 0, l = 1000; i < l; i++) {
       data.push(i);
    }

    var lv = new lvm.ListView();
    lv.items = data;
    lv.on(lvm.ListView.itemLoadingEvent, function(args){
        var label = args.view;
        if(!label) {
            label = new lm.Label();
            args.view = label;
        }
        label.text = "Item " + args.index;
    });