4
머리글 및 TabNavigator 탭을 Scroll에 숨기고 싶습니다. 어떻게해야합니까? 나는 그들을 숨기고 싶다. 그리고 스크롤에 올려라. 내 코드 :스크롤시 TabNavigators 및 머리글 숨기기
import React, { Component } from 'react';
import { View, Text, ScrollView, StyleSheet, TouchableOpacity} from 'react-native';
class ScrollTest extends Component {
render(){
const { params } = this.props.navigation.state;
return(
<View style={styles.container}>
<ScrollView>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
<View style={{styles.newView}}><Text>Test</Text></View>
</ScrollView>
</View>
)
}
}
const styles = StyleSheet.create({
container:{
flex:1, padding:5
},
newView:{
height: 200, backgroundColor:'green', margin:10
}
})
export default ScrollTest;
나는 애니메이션 API에 대한 this link을 확인하지만 수 없습니다 onScoll에서이를 구현하는 방법을 figureout 수 있나요?
그래서 헤더 홈 화면 위로 스크롤 할 때 TAB1 및 TAB2가 스크롤 및 쇼에 숨겨야합니다 탭. 어떻게해야합니까?이 작업을 시작하는 데 도움을주십시오.
감사합니다.
유용한 질문입니다. 당신이 대답 태그 날 발견하면 –