我在 react-native 中使用滚动视图来移动视图,我这样写 scrollView.scrollTo({ y: newY, animated: true });
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>
它在IOS中运行良好,但在android中无法运行,请任何人给我建议如何解决它,非常感谢任何帮助