diff --git a/README.md b/README.md index 252b4e0..70499c8 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # NativeScript Slides for iOS and Android ###_The plugin formally known as nativescript-intro-slides_ -[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/1AatGtPA6J8/0.jpg)](https://www.youtube.com/embed/1AatGtPA6J8) +###Intro slides example: +[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/kGby8qtSDjM/0.jpg)](https://www.youtube.com/embed/kGby8qtSDjM) + +###Intro slides example: +[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/kGby8qtSDjM/0.jpg)](https://www.youtube.com/embed/kGby8qtSDjM) + ##Example Usage: ###XML diff --git a/nativescript-slides.ts b/nativescript-slides.ts index dbf7d6e..d98d079 100755 --- a/nativescript-slides.ts +++ b/nativescript-slides.ts @@ -9,7 +9,12 @@ import * as AnimationModule from 'ui/animation'; import * as gestures from 'ui/gestures'; import {AnimationCurve} from 'ui/enums'; -const LayoutParams = android.view.WindowManager.LayoutParams; +let LayoutParams: any; +if (app.android) { + LayoutParams = android.view.WindowManager.LayoutParams; +} else { + LayoutParams = {}; +} export class Slide extends StackLayout { } @@ -152,9 +157,9 @@ export class SlideContainer extends AbsoluteLayout { private carousel(isenabled: boolean, time: number) { if (isenabled) { this.timer_reference = setInterval(() => { - if(typeof this.currentPanel.right !== "undefined") { + if (typeof this.currentPanel.right !== "undefined") { this.nextSlide(); - }else { + } else { clearTimeout(this.timer_reference); } }, time); @@ -200,7 +205,7 @@ export class SlideContainer extends AbsoluteLayout { window.clearFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS); } if (this._androidTranslucentNavBar === true) { - window.clearFlags(LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); + (window).clearFlags(LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); } } diff --git a/package.json b/package.json index b7b8dbb..d63e6d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-slides", - "version": "1.1.0", + "version": "1.1.1", "description": "NativeScript Slides plugin.", "main": "nativescript-slides.js", "nativescript": {