项目作者: bradmartin

项目描述 :
:santa: NativeScript plugin for a hidden :christmas_tree: game inside a pull-to-refresh layout.
高级语言: TypeScript
项目地址: git://github.com/bradmartin/nativescript-bored-rudolph.git
创建时间: 2016-07-07T05:12:48Z
项目社区:https://github.com/bradmartin/nativescript-bored-rudolph

开源协议:Other

下载


npm
npm

NativeScript-Bored-Rudolph :recycle:

NativeScript plugin for a custom hidden game inside a pull-to-refresh layout.

Demo

Demo

Native Library

Bored Rudolph

Installation

From your command prompt/termial go to your app’s root folder and execute:

tns plugin add nativescript-bored-rudolph

Usage

XML

  1. <page
  2. xmlns="http://schemas.nativescript.org/tns.xsd"
  3. xmlns:BR="nativescript-bored-rudolph" loaded="pageLoaded">
  4. <ActionBar title="Bored Rudolph" backgroundColor="#BF4066" color="#fff" ></ActionBar>
  5. <stack-layout>
  6. <BR:BoredRudolph refresh="{{ stopRefresh }}" id="rudolph">
  7. <list-view items="{{ users }}">
  8. <list-view.itemTemplate>
  9. <label text="{{ name }}" row="0" col="1" textWrap="true" class="message" ></label>
  10. </list-view.itemTemplate>
  11. </list-view>
  12. </BR:BoredRudolph>
  13. </stack-layout>
  14. </page>

TS

  1. public stopRefresh(args: any) {
  2. // Load more data here and then set 'refreshing = false' to end the refresh
  3. let boredRudolph: BoredRudolph = args.object;
  4. boredRudolph.refreshing = false;
  5. }

Attributes

refresh : function optional - this event is triggered when you set the BoredRudoplh refresh property equal to false.

API

refreshing

Property. Notifies the widget that the refresh state has changed.