22import React , { Component } from 'react' ;
33import PropTypes from 'prop-types' ;
44import { Animated , ScrollView , StyleSheet , View , Image , Dimensions } from 'react-native' ;
5+ import ViewOverflow from 'react-native-view-overflow' ;
56import type { ViewProps } from 'ViewPropTypes' ;
67import type { FlatList , SectionList , ListView } from 'react-native' ;
78
9+ const AnimatedViewOverflow = Animated . createAnimatedComponent ( ViewOverflow ) ;
10+
811type ScrollViewProps = {
912 onScroll ?: ?Function ,
1013 style ?: $PropertyType < ViewProps , 'style' > ,
@@ -150,11 +153,11 @@ class ImageHeaderScrollView extends Component<Props, State> {
150153 ] ;
151154
152155 return (
153- < Animated . View style = { [ styles . header , headerTransformStyle , this . props . headerContainerStyle ] } >
156+ < AnimatedViewOverflow style = { [ styles . header , headerTransformStyle , this . props . headerContainerStyle ] } >
154157 { this . renderHeaderProps ( ) }
155158 { ! this . props . disableOverlay && < Animated . View style = { overlayStyle } /> }
156159 < View style = { styles . fixedForeground } > { this . props . renderFixedForeground ( ) } </ View >
157- </ Animated . View >
160+ </ AnimatedViewOverflow >
158161 ) ;
159162 }
160163
@@ -175,9 +178,9 @@ class ImageHeaderScrollView extends Component<Props, State> {
175178 }
176179
177180 return (
178- < Animated . View style = { [ styles . header , headerTransformStyle ] } >
181+ < AnimatedViewOverflow style = { [ styles . header , headerTransformStyle ] } >
179182 { this . props . renderForeground ( ) }
180- </ Animated . View >
183+ </ AnimatedViewOverflow >
181184 ) ;
182185 }
183186
@@ -189,9 +192,9 @@ class ImageHeaderScrollView extends Component<Props, State> {
189192 }
190193
191194 return (
192- < Animated . View style = { [ styles . header , styles . touchableFixedForeground , { height } ] } >
195+ < AnimatedViewOverflow style = { [ styles . header , styles . touchableFixedForeground , { height } ] } >
193196 { this . props . renderTouchableFixedForeground ( ) }
194- </ Animated . View >
197+ </ AnimatedViewOverflow >
195198 ) ;
196199 }
197200
0 commit comments