nativescript-nbmaterial-recycler
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Nativescript implementation of the Recycler View

The recycler view is only available in Android. It has better performance than the default list view when the datasource size increase. on iOS it uses the defult ListView implementation.

<Page xmlns="http://schemas.nativescript.org/tns.xsd"  xmlns:rec="nativescript-nbmaterial-recycler">
 		<rec:RecyclerView row="0"  items="{{source}}" id="list" itemTap="tapItem" itemLongTap="tapLongItem" itemTemplateSelector="templateSelector">
				<rec:RecyclerView.itemTemplates>
					<template key="zero">
						<Label text="{{ text }}" backgroundColor="green" />
					</template>
					<template key="un">
						<Label text="{{ text }}" backgroundColor="white" paddingTop="10"  paddingBottom="10" />
					</template>
					<template key="deux">
						<Label text="{{ text }}" backgroundColor="red"/>
					</template>
				</rec:RecyclerView.itemTemplates>
			</rec:RecyclerView>
</Page>

}

The RecyclerView has this interface:

export declare class RecyclerView extends ListView {
    public static itemLongTapEvent;
    public recycler: any;
} 

See all modules here

Package Sidebar

Install

npm i nativescript-nbmaterial-recycler

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Unpacked Size

5.94 MB

Total Files

14

Last publish

Collaborators

  • nabil_mansouri