0

hai i designed a some registration page, For that i wrote a code like this

inputFocused (refName) {
  let android = Platform.OS == 'android'
    if(Platform.OS == android){
    let scrollResponder = this.refs.scrollView.getScrollResponder();
    scrollResponder.scrollTo({y: windowSize.height/4})
    }
    else{
     let scrollResponder = this.refs.scrollView.getScrollResponder();
    scrollResponder.scrollTo({y: windowSize.height/3})
    }

}
render{
  return(
     <TextInput
                             ref='SixthInput'
                             style={styles.textInput1}
                             secureTextEntry={true}
                             placeholder="Confirm Your Password"
                              returnKeyType='done'
                              value={this.state.confirmpassword}
                              onSubmitEditing={(event)=>{
                                        this.onRegister(); 
                                      }}
                           onFocus={this.inputFocused.bind(this, 'confirmpassword')}
                             onChange={this.handleChange.bind(this,'confirmpassword')}/>
  )
}

here the problem facing is when click on textInput in on Focus i am scrolling the view up, I wrote the scroll View below the navigation bar, When click on Textinput, It scrolls the view up, in IOS my code is working correctly, but in android when keyboard appear it moves the total View up, Below attcahed the image of issue which i am facing enter image description here

can any one give me suggestions that how to resolve it, Any help much appreciated

Hussian Shaik
  • 2,559
  • 9
  • 37
  • 57
  • Please see this for possible answers: http://stackoverflow.com/questions/4207880/android-how-do-i-prevent-the-soft-keyboard-from-pushing-my-view-up – Mike Grabowski Jul 29 '16 at 06:49
  • thanks your replay, here the problem is i want to scroll up the view after navigator not total view, when click on last textInput in my page i want to scroll the View, because when keyboard appear,it covers the last textbox for that i wrote like this in manifest file android:windowSoftInputMode="adjustPan". but it totally move the view up, it covers the status bar, which i attached in image, Please give me solution for it – Hussian Shaik Jul 30 '16 at 07:36

0 Answers0