反射原生中的滚动视图在android中不起作用

时间:2016-03-31 12:00:39

标签: react-native react-native-scrollview

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

0 个答案:

没有答案
相关问题