Skip to content

Commit d6cd73d

Browse files
Merge pull request #12 from TheOriginalJosh/fixing-compiler-errors
Fixing compiler errors
2 parents e1e3a81 + e551aab commit d6cd73d

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# NativeScript Slides for iOS and Android
22
###_The plugin formally known as nativescript-intro-slides_
3-
[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/1AatGtPA6J8/0.jpg)](https://www.youtube.com/embed/1AatGtPA6J8)
3+
###Intro slides example:
4+
[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/kGby8qtSDjM/0.jpg)](https://www.youtube.com/embed/kGby8qtSDjM)
5+
6+
###Intro slides example:
7+
[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/kGby8qtSDjM/0.jpg)](https://www.youtube.com/embed/kGby8qtSDjM)
8+
49

510
##Example Usage:
611
###XML

nativescript-slides.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import * as AnimationModule from 'ui/animation';
99
import * as gestures from 'ui/gestures';
1010
import {AnimationCurve} from 'ui/enums';
1111

12-
const LayoutParams = android.view.WindowManager.LayoutParams;
12+
let LayoutParams: any;
13+
if (app.android) {
14+
LayoutParams = <any>android.view.WindowManager.LayoutParams;
15+
} else {
16+
LayoutParams = {};
17+
}
1318

1419
export class Slide extends StackLayout { }
1520

@@ -152,9 +157,9 @@ export class SlideContainer extends AbsoluteLayout {
152157
private carousel(isenabled: boolean, time: number) {
153158
if (isenabled) {
154159
this.timer_reference = setInterval(() => {
155-
if(typeof this.currentPanel.right !== "undefined") {
160+
if (typeof this.currentPanel.right !== "undefined") {
156161
this.nextSlide();
157-
}else {
162+
} else {
158163
clearTimeout(this.timer_reference);
159164
}
160165
}, time);
@@ -200,7 +205,7 @@ export class SlideContainer extends AbsoluteLayout {
200205
window.clearFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS);
201206
}
202207
if (this._androidTranslucentNavBar === true) {
203-
window.clearFlags(LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
208+
(<any>window).clearFlags(LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
204209
}
205210
}
206211

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-slides",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "NativeScript Slides plugin.",
55
"main": "nativescript-slides.js",
66
"nativescript": {

0 commit comments

Comments
 (0)