0

Hello I just started to use React Native and I want to use an image as background but when press to an input text the image moves a little bit up and I want to be fixed.

const backgroundImage = './assets/background-blur.jpg'

const App = () => {
    return (
        <View>
            <ImageBackground source={require(backgroundImage)} style={style.background}>
                <ScrollView>
                    <SearchInput />
                </ScrollView>
            </ImageBackground>
        </View>
    )
}

const style = StyleSheet.create({
    background: {
        width: '100%',
        height: '100%'
    }
})

Any suggestion?

ravibagul91
  • 20,072
  • 5
  • 36
  • 59
Jonathan Gómez
  • 403
  • 1
  • 6
  • 19

0 Answers0