我正在创建一个折叠标题,并且我还在下面滚动内容。发生的是滚动视图完美运行,但是每次我调用水平滚动视图时,垂直视图都会停止工作。
我同时尝试了水平滚动视图和滚动视图
int f(int a, int b, int c)
{
const int x = a * b - c;
const int y = a + c;
return x / y;
}
int f(int a, int b, int c, MyEnum e)
{
const int sign = sign(e);
if (sign == 1) return f(a, b, c);
else return f(a, b, -c);
}
{/ *将所有组件都放在ScrollView中* /}
return(
<View style = { styles.MainContainer }>
<ScrollView
scrollEventThrottle = { 16 }
contentContainerStyle = {{ paddingTop: Header_Maximum_Height }}
onScroll = { Animated.event(
[{ nativeEvent: { contentOffset: { y: this.AnimatedHeaderValue }}}]
)}>
{/* Put all your Component here inside the ScrollView */}
<ScrollView horizontal = {true} pagingEnabled = {true} style=
{styles.container}>
<View style ={styles.scroll2} >
<Text style={styles.title}>Update Profile</Text>
<TextInput placeholder ="username" style={styles.input} />
<TextInput placeholder ="password" style={styles.input} />
<View style={styles.spread}>
<TouchableOpacity style={styles.button}>
<Text style={styles.buttontext}>Login</Text>
</TouchableOpacity>
</View>
</View>
<View style ={styles.scroll2} >
<Text style={styles.title}>Update Profile</Text>
</View>
我希望表格在标题缩小时向上滚动,我也可以在表格上向左或向右滑动