@@ -15,35 +15,22 @@ NativeScript-Loading-Indicator is a plugin for NativeScript which overlays a loa
15
15
<a href="https://www.npmjs.com/package/@nstudio/nativescript-loading-indicator">
16
16
<img src="https://img.shields.io/npm/dt/@nstudio/nativescript-loading-indicator.svg?label=npm%20downloads" alt="npm">
17
17
</a>
18
- <a href="https://github.com/nstudio/nativescript-loading-indicator/stargazers">
19
- <img src="https://img.shields.io/github/stars/nstudio/nativescript-loading-indicator.svg" alt="stars">
20
- </a>
21
- <a href="https://github.com/nstudio/nativescript-loading-indicator/network">
22
- <img src="https://img.shields.io/github/forks/nstudio/nativescript-loading-indicator.svg" alt="forks">
23
- </a>
24
- <a href="https://github.com/nstudio/nativescript-loading-indicator/blob/master/LICENSE">
25
- <img src="https://img.shields.io/github/license/nstudio/nativescript-loading-indicator.svg" alt="license">
26
- </a>
27
- <a href="http://nstudio.io">
28
- <img src="https://github.com/nstudio/media/blob/master/images/nstudio-banner.png?raw=true" alt="nStudio banner">
29
- </a>
30
- <h5 align="center">Do you need assistance on your project or plugin? Contact the nStudio team anytime at <a href="mailto:[email protected] ">[email protected] </a> to get up to speed with the best practices in mobile and web app development.
31
- </h5>
32
-
33
18
</p >
34
19
35
20
---
36
21
37
22
## Installation
38
23
39
- ## NativeScript 6.3+
24
+ ## NativeScript 7+:
25
+
40
26
``` bash
41
- tns plugin add @nstudio/nativescript-loading-indicator
27
+ ns plugin add @nstudio/nativescript-loading-indicator
42
28
```
43
29
44
- ## NativeScript lower than 6.3
30
+ ## NativeScript lower than 7:
31
+
45
32
``` bash
46
- tns plugin add @nstudio/nativescript-loading-indicator@2 .0.5
33
+ tns plugin add @nstudio/nativescript-loading-indicator@3 .0.x
47
34
```
48
35
49
36
## Screenshots
81
68
import {
82
69
LoadingIndicator ,
83
70
Mode ,
84
- OptionsCommon
71
+ OptionsCommon ,
85
72
} from ' @nstudio/nativescript-loading-indicator' ;
86
73
87
74
const indicator = new LoadingIndicator ();
@@ -102,14 +89,14 @@ const options: OptionsCommon = {
102
89
android: {
103
90
view: someStackLayout .android , // Target view to show on top of (Defaults to entire window)
104
91
cancelable: true ,
105
- cancelListener : function (dialog ) {
92
+ cancelListener : function (dialog ) {
106
93
console .log (' Loading cancelled' );
107
- }
94
+ },
108
95
},
109
96
ios: {
110
97
view: someButton .ios , // Target view to show on top of (Defaults to entire window)
111
- square: false
112
- }
98
+ square: false ,
99
+ },
113
100
};
114
101
115
102
indicator .show (options );
@@ -145,13 +132,13 @@ const options = {
145
132
android: {
146
133
view: android .view .View , // Target view to show on top of (Defaults to entire window)
147
134
cancelable: true ,
148
- cancelListener : function (dialog ) {
135
+ cancelListener : function (dialog ) {
149
136
console .log (' Loading cancelled' );
150
- }
137
+ },
151
138
},
152
139
ios: {
153
- view: UIView // Target view to show on top of (Defaults to entire window)
154
- }
140
+ view: UIView, // Target view to show on top of (Defaults to entire window)
141
+ },
155
142
};
156
143
157
144
loader .show (options); // options is optional
@@ -272,6 +259,6 @@ export enum Mode {
272
259
DeterminateHorizontalBar = 2 ,
273
260
AnnularDeterminate = 3 ,
274
261
CustomView = 4 ,
275
- Text = 5
262
+ Text = 5 ,
276
263
}
277
264
```
0 commit comments