如何在标题下也为背景创建渐变?最好是在整个屏幕上,也在顶部栏中。
SignInScreen:
static navigationOptions = {
headerStyle: {
backgroundColor: 'transparent',
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
}
};
render(){
return(
<LinearGradient colors={['#13547a', '#80d0c7']} style={styles.linearGradient}>
<View style={styles.container}>
<LoginForm navigation={this.props.navigation} />
</View>
</LinearGradient>
)
}
答案 0 :(得分:0)
static navigationOptions = {
title: 'some string title',
headerTitleStyle: {
},
headerStyle: {
backgroundColor:'rgba(0,0,0,0.6)'
},
headerTintColor: {
},
}