React native 在android中,在react native中滚动视图不起作用
我在react native中使用scroll view来移动视图,我这样写React native 在android中,在react native中滚动视图不起作用,react-native,react-native-scrollview,React Native,React Native Scrollview,我在react native中使用scroll view来移动视图,我这样写scrollView.scrollTo({y:newY,animated:true}) scrolldown(){ this.refs.ScrollView.scrollTo({y:WindowsSize.width*2/9,动画:true}); } 卷轴(){ this.refs.ScrollView.scrollTo({y:WindowsSize.width*2/23,动画:true}); } . . . . 它在
scrollView.scrollTo({y:newY,animated:true})代码>
scrolldown(){
this.refs.ScrollView.scrollTo({y:WindowsSize.width*2/9,动画:true});
}
卷轴(){
this.refs.ScrollView.scrollTo({y:WindowsSize.width*2/23,动画:true});
}
.
.
.
.
它在IOS中工作正常,但在android中不工作,任何人请给我建议如何解决它,非常感谢任何帮助你能分享一个你正在使用的代码示例吗?@QMFNP上面我用我的更新更新它,你能检查它给我建议吗
scrolldown(){
this.refs.ScrollView.scrollTo({y:windowSize.width*2/9,animated: true});
}
scroll(){
this.refs.ScrollView.scrollTo({y:windowSize.width*2/23,animated: true});
}
<ScrollView ref='ScrollView'>
<View style={styles.inputContainer}>
<Image style={styles.inputPassword} source={require('image!locker')}/>
<TextInput
ref='SecondInput'
password={true}
style={styles.email}
value={this.state.password}
placeholder="Password"
onFocus={this.scrolldown.bind(this)}
returnKeyType='next'
onChange={this.handlePasswordChange.bind(this)}
/>
</View>
.
.
.
.
</ScrollView>