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
+29-11Lines changed: 29 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,17 +80,39 @@ add as many ``<Slides:Slide>`` as you want.
80
80
81
81
-**loop : boolean** - If 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.
82
82
83
-
-**velocityScrolling : boolean** - If true will calculate transitions speeds based on the finger movement speed.
83
+
-**disablePan : boolean** - If true panning is disabled. So that you can call nextSlide()/previousSlide() functions to change the slide. If slides is used to get details about users like email, phone number, username etc. in this case you don't want users to move from one slide to another slide without filling details.
84
+
85
+
-**pagerOffset : string** - Margin-top for the pager. Number or percentage, default 88%.
84
86
85
87
-**pageIndicators : boolean** - If true adds indicator dots to the bottom of your slides.
86
88
87
-
-**indicatorsColor : string** - color of the indicator dots.
89
+
#### Indicators
88
90
89
-
-**interval : integer** - 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>`), it can be restarted with `startSlidShow`.
91
+
If the property `pageIndicators` is `true` you won't see the page indicators anymore as of 2.0.0 right away. there are two css classes exposed that you can setup however you like for active and inactive indicators. below is an example for semi translucent dots.
90
92
91
-
-**disablePan : boolean** - If true panning is disabled. So that you can call nextSlide()/previousSlide() functions to change the slide. If slides is used to get details about users like email, phone number, username etc. in this case you don't want users to move from one slide to another slide without filling details.
93
+
```css
94
+
.slide-indicator-inactive{
95
+
background-color: #fff;
96
+
opacity : 0.4;
97
+
width : 10;
98
+
height : 10;
99
+
margin-left : 2.5;
100
+
margin-right : 2.5;
101
+
margin-top : 0;
102
+
border-radius : 5;
103
+
}
92
104
93
-
-**pagerOffset : string** - Margin-top for the pager. Number or percentage, default 88%.
105
+
.slide-indicator-active{
106
+
background-color: #fff;
107
+
opacity : 0.9;
108
+
width : 10;
109
+
height : 10;
110
+
margin-left : 2.5;
111
+
margin-right : 2.5;
112
+
margin-top : 0;
113
+
border-radius : 5;
114
+
}
115
+
```
94
116
95
117
#### Events
96
118
-**start** - Start pan
@@ -102,10 +124,6 @@ add as many ``<Slides:Slide>`` as you want.
102
124
To use the slides with Angular2 and the `registerElement` from `nativescript-angular` you will want to set the `SlideContainer`'s property of `angular` to `true`. Then in your angular component in the `ngAfterViewInit`. you will want to have an instance of your slide container to call the function `constructView()`.
103
125
[Follow the example](https://github.com/TheOriginalJosh/nativescript-slides/issues/37#issuecomment-224820901)
104
126
105
-
#### Android Optional Attributes
106
-
-**androidTranslucentStatusBar : boolean** - If true the Android status bar will be translucent on devices that support it. (Android sdk >= 19).
107
-
-**androidTranslucentNavBar : boolean** - If true the Android navigation bar will be translucent on devices that support it. (Android sdk >= 19).
108
-
109
127
#### Plugin Development Work Flow:
110
128
111
129
* Clone repository to your machine.
@@ -115,7 +133,7 @@ To use the slides with Angular2 and the `registerElement` from `nativescript-ang
115
133
116
134
#### Known issues
117
135
118
-
* There apears to be a bug with the loop resulting in bad transitions going right to left.
136
+
* There appears to be a bug with the loop resulting in bad transitions going right to left.
119
137
120
138
#### How To: Load slides dynamically
121
139
You want to hook into the loaded event of the view and then create your view elements.
@@ -127,7 +145,7 @@ You want to hook into the loaded event of the view and then create your view ele
127
145
``` ts
128
146
import * as slides from 'nativescript-slides/nativescript-slides'
129
147
130
-
export function onSlideContainerLoaded(args) {
148
+
export function onSlideContainerLoaded(args) {
131
149
let slideContainer = <slides.SlideContainer>args.object;
* Same as imageNamed, however calls to this method are sinchronized to be thread safe in iOS8 along with calls to tns_safeImageNamed and tns_safeDecodeImageNamed:completion:
19
+
* imageNamed is thread safe in iOS 9 and later so in later versions this methods simply fallbacks to imageNamed:
0 commit comments