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
+39-5Lines changed: 39 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,8 +61,8 @@ The `HeaderImageScrollView` handle also the following props. None is required :
61
61
|`maxOverlayOpacity`|`number`|`0.3`| Opacity of a black overlay on the header when in navbar mode |[example](https://github.com/bamlab/react-native-image-header-scroll-view-example/blob/3b9d2d0d7f71c6bf877e2d10cc65c9ab7e1b484d/src/Pages/TvShow.js#L96)|
62
62
|`overlayColor`|`string`|`black`| Color of the overlay on the header |[example](https://github.com/bamlab/react-native-image-header-scroll-view-example/blob/master/src/Pages/Colors.js#L16)|
63
63
|`useNativeDriver`|`boolean`|`false`| Use native driver for the animation for performance improvement. A few props are unsupported at the moment if `useNativeDriver=true` (`onScroll`, `ScrollComponent`, `renderTouchableFixedForeground`) | - |
64
-
65
-
64
+
|`headerContainerStyle`|`Object`|`undefined`| Optional styles to be passed to the container of the header component|
65
+
|`disableHeaderGrow`|`boolean`|`undefined`| Disable to grow effect on the header|
66
66
67
67
### Foreground
68
68
@@ -73,6 +73,7 @@ The `HeaderImageScrollView` handle also the following props. None is required :
73
73
|`foregroundParallaxRatio`|`number`|`1`| Ration for parallax effect of foreground when scrolling. If 2, the header goes up two times faster than the scroll |[example](https://github.com/bamlab/react-native-image-header-scroll-view-example/blob/master/src/Pages/Colors.js#L23)|
74
74
|`fadeOutForeground`|`bool`|`false`| If set, add a fade out effect on the foreground when scroll up |[example](https://github.com/bamlab/react-native-image-header-scroll-view-example/blob/master/src/Pages/Colors.js#L13)|
75
75
|`renderTouchableFixedForeground`|`function`| Empty view | Same as `renderFixedForeground` but allow to use touchable in it. [*Can cause performances issues on Android*](https://github.com/bamlab/react-native-image-header-scroll-view/issues/6)|[example](https://github.com/bamlab/react-native-image-header-scroll-view-example/blob/master/src/Pages/PullToRefresh.js#L45)|
76
+
|`fixedForegroundContainerStyles`|`Object`|`undefined`| Optional styles to be passed to the container of the fixed foreground component|
76
77
77
78
### Mixed
78
79
@@ -98,7 +99,39 @@ All of the properties of `View` are supported.
98
99
|`onDisplay`|`function`| Called when the component finished to be displayed again. |
99
100
|`onTouchTop`|`function`| Called when the Top of the component touch the Top of the ScrollView. (`onDisplay` + `onBeginHidden`) |
100
101
|`onTouchBottom`|`function`| Called when the Bottom of the component touch the Top of the ScrollView. (`onHide` + `onBeginDisplayed`) |
101
-
### Contributing
102
+
103
+
104
+
105
+
## FAQ
106
+
107
+
### How to remove the black image overlay
108
+
109
+
Just set the `maxOverlayOpacity` to `0`.
110
+
111
+
```jsx
112
+
<HeaderImageScrollView
113
+
minOverlayOpacity={0}
114
+
maxOverlayOpacity={0}
115
+
{/* ... */}
116
+
/>
117
+
118
+
```
119
+
120
+
### How to remove the image zomming on scroll down
121
+
122
+
You have two solutions :
123
+
124
+
1. You can use the `disableHeaderGrow` props. It will keep the ios elastic scroll effect.
125
+
2. You can also use the `bounces={false}` props [from the scroll view](https://facebook.github.io/react-native/docs/scrollview#bounces).
0 commit comments