An open API service indexing awesome lists of open source software.

https://github.com/nathanwalker/nativescript-shimmer

Facebook Shimmer effect for your NativeScript app - iOS and Android.
https://github.com/nathanwalker/nativescript-shimmer

android facebook facebook-shimmer ios nativescript shimmer

Last synced: 6 months ago
JSON representation

Facebook Shimmer effect for your NativeScript app - iOS and Android.

Awesome Lists containing this project

README

          

## NativeScript Shimmer

Facebook shimmer effect for your NativeScript app.

Uses the following native plugins:

* iOS: https://github.com/facebook/Shimmer
* Android: http://facebook.github.io/shimmer-android/

### Demo

![Demo](https://cdn.filestackcontent.com/PGhmVZmQqOYjv5v0OCl5?v=0)

### Usage

* `main-page.xml`:

```XML






```

* `main-page.ts`:

```Javascript
import {EventData, Observable} from "data/observable";
import {Page} from "ui/page";

// Event handler for Page "loaded" event attached in main-page.xml
export function pageLoaded(args: observable.EventData) {
// Get the event sender
let page = args.object;
page.bindingContext = new ShimmerDemo(page);
}

class ShimmerDemo extends Observable {
private _enableTxt: string;
private _shimmer: any;

constructor(page: Page) {
super();
this._shimmer = page.getViewById('shimmer');
}

public toggleShimmer() {
this._shimmer.enabled = !this._shimmer.enabled;
}
}
```

### LICENSE

BSD