aron ar
aron ar

Reputation: 53

Make button absolute not moving when show keyboard react native

I have button in the bottom of the screen and the position of the button is absolute, but when the keyboard appear the button went up above the keyboard, is there a way to make the button stay in its position. Thankyou

my Code:

return(
        <TouchableOpacity onPress={() => this.submitUpdate()}
        style={styles.buttonPress} 
        >
          <Image style={styles.buttonImage}  source={require('../../../assets/images/tombol-simpan.png')}/>
        </TouchableOpacity>
      )

Styles :

buttonImage: {
    position: 'absolute',
    alignSelf: "center",
    //marginTop: "2%",
    width: "100%",
    height: 80,
  },
  buttonPress: {
    position: 'absolute',
    alignSelf: "center",
    //marginTop: "2%",
    width: "100%",
    height: 80,
    top: '85%',
  },

enter image description hereenter image description here

Upvotes: 1

Views: 1715

Answers (1)

Anwar Gul
Anwar Gul

Reputation: 683

place your bottom button outside the keyboardavoidingview / scrollview .

Upvotes: 1

Related Questions