You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-27Lines changed: 30 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,47 @@
1
-
# Nativescript Intro Slides for iOS and Android
2
-
###_Not just for intro slides any more! Great for **Image Carousels** too!_ ###
3
-
4
-
[](https://www.youtube.com/embed/1AatGtPA6J8)
1
+
# NativeScript Slides for iOS and Android
2
+
###_The plugin formally known as nativescript-intro-slides_
3
+
[](https://www.youtube.com/embed/1AatGtPA6J8)
5
4
6
5
##Example Usage:
7
6
###XML
8
7
```xml
9
8
10
-
<IntroSlides:IntroSlides>
11
-
<IntroSlides:Slideclass="intro-slide-1">
9
+
<Slides:SlideContainer>
10
+
<Slides:Slideclass="slide-1">
12
11
<Labeltext="This is Panel 1" />
13
-
</IntroSlides:Slide>
14
-
<IntroSlides:Slideclass="intro-slide-2">
12
+
</Slides:Slide>
13
+
<Slides:Slideclass="slide-2">
15
14
<Labeltext="This is Panel 2" />
16
-
</IntroSlides:Slide>
17
-
<IntroSlides:Slideclass="intro-slide-3">
15
+
</Slides:Slide>
16
+
<Slides:Slideclass="slide-3">
18
17
<Labeltext="This is Panel 3" />
19
-
</IntroSlides:Slide>
20
-
<IntroSlides:Slideclass="intro-slide-4">
18
+
</Slides:Slide>
19
+
<Slides:Slideclass="slide-4">
21
20
<Labeltext="This is Panel 4" />
22
-
</IntroSlides:Slide>
23
-
<IntroSlides:Slideclass="intro-slide-5">
21
+
</Slides:Slide>
22
+
<Slides:Slideclass="slide-5">
24
23
<Labeltext="This is Panel 5" />
25
-
</IntroSlides:Slide>
26
-
</IntroSlides:IntroSlides>
24
+
</Slides:Slide>
25
+
</Slides:SlideContainer>
27
26
28
27
```
29
28
###CSS
30
29
```css
31
-
.intro-slide-1{
30
+
.slide-1{
32
31
background-color: darkslateblue;
33
32
}
34
33
35
-
.intro-slide-2{
34
+
.slide-2{
36
35
background-color: darkcyan;
37
36
}
38
-
.intro-slide-3{
37
+
.slide-3{
39
38
background-color: darkgreen;
40
39
}
41
40
42
-
.intro-slide-4{
41
+
.slide-4{
43
42
background-color: darkgoldenrod;
44
43
}
45
-
.intro-slide-5{
44
+
.slide-5{
46
45
background-color: darkslategray;
47
46
}
48
47
Label{
@@ -53,18 +52,22 @@ Label{
53
52
}
54
53
55
54
```
55
+
Great for Intros/Tutorials to Image Carousels.
56
+
57
+
To use the intro slide plugin you need to first import it into your xml layout with `xmlns:Slides="nativescript-slides"`
56
58
57
-
To use the intro slide plugin you need to first import it into your xml layout with `xmlns:IntroSlides="nativescript-intro-slides"`
59
+
when using the intro slide plugin you need at least two ``<Slides:Slide>`` views inside of the ``<Slides:SlideContainer>``.
58
60
59
-
when using the intro slide plugin you need at least two ``<IntroSlides:Slide>``views inside of the ``<IntroSlides:IntroSlides>``.
61
+
add as many ``<Slides:Slide>``as you want.
60
62
61
-
add as many ``<IntroSlides:Slide>`` as you want.
63
+
the `SlideContainer` class also has public `nextSlide` and `previousSlide` functions so you can add your own previous and next buttons as needed.
62
64
63
-
the `IntroSlides` class also has public `nextSlide`and `previousSlide` functions so you can add your own previous and next buttons as needed.
65
+
the `<Slides:SlideContainer>` element also has a property called `loop` which is a boolean value and if set to true will cause the slide to be an endless loop. The suggested use case would be for a Image Carousel or something of that nature.
64
66
65
-
the `<IntroSlides:IntroSlides>` element also has a property called `loop` which is a boolean value and if set to true will cause the slide to be an endless loop. The suggested use case would be for a Image Carousel or something of that nature.
67
+
the `<Slides:SlideContainer>` element also has a property called `interval` which is a integer value and the value is in milliseconds. The suggested use case would be for a Image Carousel or something of that nature which can change the image for every fixed intervals. In unloaded function call page.getViewById("your_id").stopSlideshow() to unregister it (your_id is the id given to `<Slides:SlideContainer>`).
66
68
67
-
the `<IntroSlides:IntroSlides>` element also has a property called `interval` which is a integer value and the value is in milliseconds. The suggested use case would be for a Image Carousel or something of that nature which can change the image for every fixed intervals. In unloaded function call page.getViewById("your_id").stopSlideshow() to unregister it (your_id is the id given to `<IntroSlides:IntroSlides>`).
69
+
#### Android Optional Attribute
70
+
-`AndroidTransparentStatusBar`: boolean - If true, the Android status bar will be transparent on devices that support it. Typically this is API >=21 (Lollipop).
0 commit comments