File tree Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 5
5
StyleSheet ,
6
6
Text ,
7
7
View ,
8
- TouchableOpacity ,
9
8
Animated ,
10
9
Dimensions ,
11
10
Image ,
@@ -102,7 +101,7 @@ const defaulStyles = {
102
101
justifyContent : 'center' ,
103
102
alignItems : 'center' ,
104
103
} ,
105
- }
104
+ } ;
106
105
107
106
export default class AppIntro extends Component {
108
107
constructor ( props ) {
@@ -333,7 +332,11 @@ export default class AppIntro extends Component {
333
332
}
334
333
335
334
if ( this . isToTintStatusBar ( ) ) {
336
- StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( this . props . pageArray [ 0 ] . backgroundColor , - 0.3 ) , false ) ;
335
+ const statusBarColor = this . props . pageArray [ 0 ] . statusBarColor || this . props . pageArray [ 0 ] . backgroundColor || undefined ;
336
+
337
+ if ( statusBarColor ) {
338
+ StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( statusBarColor , - 0.3 ) , false ) ;
339
+ }
337
340
}
338
341
339
342
return (
@@ -345,7 +348,11 @@ export default class AppIntro extends Component {
345
348
renderPagination = { this . renderPagination }
346
349
onMomentumScrollEnd = { ( e , state ) => {
347
350
if ( this . isToTintStatusBar ( ) ) {
348
- StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( this . props . pageArray [ state . index ] . backgroundColor , - 0.3 ) , false ) ;
351
+ const statusBarColor = this . props . pageArray [ state . index ] . statusBarColor || this . props . pageArray [ state . index ] . backgroundColor || undefined ;
352
+
353
+ if ( statusBarColor ) {
354
+ StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( statusBarColor , - 0.3 ) , false ) ;
355
+ }
349
356
}
350
357
351
358
this . props . onSlideChange ( state . index , state . total ) ;
Original file line number Diff line number Diff line change 5
5
StyleSheet ,
6
6
Text ,
7
7
View ,
8
- TouchableOpacity ,
9
8
Animated ,
10
9
Dimensions ,
11
10
Image ,
@@ -102,7 +101,7 @@ const defaulStyles = {
102
101
justifyContent : 'center' ,
103
102
alignItems : 'center' ,
104
103
} ,
105
- }
104
+ } ;
106
105
107
106
export default class AppIntro extends Component {
108
107
constructor ( props ) {
@@ -333,7 +332,11 @@ export default class AppIntro extends Component {
333
332
}
334
333
335
334
if ( this . isToTintStatusBar ( ) ) {
336
- StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( this . props . pageArray [ 0 ] . backgroundColor , - 0.3 ) , false ) ;
335
+ const statusBarColor = this . props . pageArray [ 0 ] . statusBarColor || this . props . pageArray [ 0 ] . backgroundColor || undefined ;
336
+
337
+ if ( statusBarColor ) {
338
+ StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( statusBarColor , - 0.3 ) , false ) ;
339
+ }
337
340
}
338
341
339
342
return (
@@ -345,7 +348,11 @@ export default class AppIntro extends Component {
345
348
renderPagination = { this . renderPagination }
346
349
onMomentumScrollEnd = { ( e , state ) => {
347
350
if ( this . isToTintStatusBar ( ) ) {
348
- StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( this . props . pageArray [ state . index ] . backgroundColor , - 0.3 ) , false ) ;
351
+ const statusBarColor = this . props . pageArray [ state . index ] . statusBarColor || this . props . pageArray [ state . index ] . backgroundColor || undefined ;
352
+
353
+ if ( statusBarColor ) {
354
+ StatusBar . setBackgroundColor ( this . shadeStatusBarColor ( statusBarColor , - 0.3 ) , false ) ;
355
+ }
349
356
}
350
357
351
358
this . props . onSlideChange ( state . index , state . total ) ;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class Example extends Component {
54
54
width: 109 * 2.5 ,
55
55
},
56
56
backgroundColor: ' #fa931d' ,
57
+ statusBarColor: ' #fa931d' , // Specify if you don't want to be inferred. If you don't specify a 30% darker color will be inferred from your background color.
57
58
fontColor: ' #fff' ,
58
59
level: 10 ,
59
60
}, {
You can’t perform that action at this time.
0 commit comments