我在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上工作,任何人请给我建议如何解决它,任何帮助非常感谢