How to use nativescript-ui-listview - 10 common examples

To help you get started, we’ve selected a few nativescript-ui-listview examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bakerac4 / glimmer-native / dist / src / dom / native / RadListViewElement.js View on Github external
loadView(viewType) {
        if (viewType === ListViewViewType.ItemView) {
            console.log('creating view for ', viewType);
            let wrapper = createElement('StackLayout');
            wrapper.setAttribute('class', 'list-view-item');
            const template = this.itemTemplateComponent;
            const component = GlimmerResolverDelegate.lookupComponent('my-insane-component');
            const compiled = component.compilable.compile(Application.context);
            const cursor = { element: wrapper, nextSibling: null };
            // let component = Compilable(template.args.src);
            // const compiled = component.compile(Application.context);
            let componentInstance = Application._renderComponent(null, cursor, compiled, template.args);
            let nativeEl = wrapper.nativeView;
            nativeEl.__GlimmerComponent__ = componentInstance._meta.component;
            return nativeEl;
        }
    }
    updateListItem(args) {
github bakerac4 / glimmer-native / src / dom / native / RadListViewElement.ts View on Github external
loadView(viewType: string): View {
        if (viewType === ListViewViewType.ItemView) {
            console.log('creating view for ', viewType);
            let wrapper = createElement('StackLayout') as NativeElementNode;
            wrapper.setAttribute('class', 'list-view-item');
            const template = this.itemTemplateComponent as any;
            const component = GlimmerResolverDelegate.lookupComponent('my-insane-component');
            const compiled = component.compilable.compile(Application.context);
            const cursor = { element: wrapper, nextSibling: null } as Cursor;
            // let component = Compilable(template.args.src);
            // const compiled = component.compile(Application.context);
            let componentInstance = Application._renderComponent(null, cursor, compiled, template.args);

            let nativeEl = wrapper.nativeView;
            (nativeEl as any).__GlimmerComponent__ = componentInstance._meta.component;
            return nativeEl;
        }
    }
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
logger.debug("creating view for " + viewType);

        let wrapper = createElement('StackLayout') as NativeViewElementNode
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
let wrapper = createElement('StackLayout') as NativeViewElementNode
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
private loadView(viewType: string): View {
        if (viewType.toLowerCase() == ListViewViewType.ItemView.toLowerCase() && typeof this.nativeElement.itemTemplates == "object" ) {
            let keyedTemplate = this.nativeElement.itemTemplates.find(t => t.key == "default");
            if (keyedTemplate) {
                return keyedTemplate.createView()
            }
        }

        let componentClass = this.getComponentForView(viewType);
        if (!componentClass) return null;
        logger.debug("creating view for " + viewType);

        let wrapper = createElement('StackLayout') as NativeViewElementNode
github bakerac4 / glimmer-native / src / dom / native / RadListViewElement.ts View on Github external
constructor() {
        super('radlistview', RadListView, null);

        let nativeView = this.nativeView as RadListView;

        nativeView.itemViewLoader = (viewType: any): View => this.loadView(viewType);
        this.nativeView.on(RadListView.itemLoadingEvent, (args) => {
            this.updateListItem(args as ListViewEventData);
        });
    }
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
constructor() {
        super('radlistview', RadListView);
        let nativeView = this.nativeView;
        nativeView.itemViewLoader = (viewType: any): View => this.loadView(viewType)
        this.nativeView.on(RadListView.itemLoadingEvent, (args) => { this.updateListItem(args as ListViewEventData) });
        this.nativeView.on(RadListView.itemSwipeProgressStartedEvent, (args) => { this.updateSwipeItem(args as SwipeActionsEventData) });
    }
github bakerac4 / glimmer-native / dist / src / dom / native / RadListViewElement.js View on Github external
constructor() {
        super('radlistview', RadListView, null);
        let nativeView = this.nativeView;
        nativeView.itemViewLoader = (viewType) => this.loadView(viewType);
        this.nativeView.on(RadListView.itemLoadingEvent, (args) => {
            this.updateListItem(args);
        });
    }
    get itemTemplateComponent() {
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
constructor() {
        super('radlistview', RadListView);
        let nativeView = this.nativeView;
        nativeView.itemViewLoader = (viewType: any): View => this.loadView(viewType)
        this.nativeView.on(RadListView.itemLoadingEvent, (args) => { this.updateListItem(args as ListViewEventData) });
        this.nativeView.on(RadListView.itemSwipeProgressStartedEvent, (args) => { this.updateSwipeItem(args as SwipeActionsEventData) });
    }
github RafaelSNascimento / NativeScriptChat / chatNativeScriptApp / app / app.module.js View on Github external
AppModule = __decorate([
        core_1.NgModule({
            declarations: [
                app_component_1.AppComponent,
                chat_component_1.ChatComponent,
                chat_box_component_1.ChatBoxComponent,
                login_component_1.LoginComponent
            ],
            bootstrap: [app_component_1.AppComponent],
            imports: [
                nativescript_module_1.NativeScriptModule,
                forms_1.NativeScriptFormsModule,
                http_1.NativeScriptHttpModule,
                router_1.NativeScriptRouterModule,
                forms_2.ReactiveFormsModule,
                angular_1.NativeScriptUIListViewModule,
                router_1.NativeScriptRouterModule.forRoot(app_routing_1.routes)
            ],
            providers: [userChat_service_1.UserChatService, common_functions_service_1.CommonFunctionsService, singleton_service_1.SingletonService, socket_service_1.SocketService, forms_2.FormBuilder],
            schemas: [core_1.NO_ERRORS_SCHEMA],
        })
    ], AppModule);
    return AppModule;
}());
exports.AppModule = AppModule;

nativescript-ui-listview

A powerful data list control implementing a bunch of features native to the mobile world as item animations, pull-to-refresh, item layouts, load-on-demand, swipe-to-execute, etc.

Apache-2.0
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis