Open j-rayhan opened 4 years ago
Please test this code on android. It's doesn't work in android phone
const Backdrop = ({ movies, scrollX }) => { return ( <View style={{ position: 'absolute', width, height: BACKDROP_HEIGHT }}> <FlatList data={movies} keyExtractor={(item) => item.key} renderItem={({ item, index }) => { if (!item.backdrop) { return null; } const inputRange = [(index - 2) * ITEM_SIZE, (index - 1) * ITEM_SIZE]; const translateX = scrollX.interpolate({ inputRange, outputRange: [-width, 0], }); return ( <MaskedView style={{ position: 'absolute' }} maskElement={ <AnimatedSvg width={width} height={height} viewBox={`0 0 ${width} ${height}`} style={{ transform: [{ translateX }] }} > <Rect x='0' y='0' width={width} height={height} fill='red' /> </AnimatedSvg> } > <Image source={{ uri: item.backdrop }} style={{ width, height: BACKDROP_HEIGHT, resizeMode: 'cover', }} /> </MaskedView> ); }} /> <LinearGradient colors={['transparent', 'white']} style={{ width, height: BACKDROP_HEIGHT, position: 'absolute', bottom: 0, }} /> </View> ); };
Do you know how to fix this? @j-rayhan
@ihsanrawi @ihsanrawi Please check current code in this project. Already overwrite for support on android
Please test this code on android. It's doesn't work in android phone