I'm working on a react native android application. My IDE is android studio and I'm using android studio emulator.
When I try to load local background image to my application page, the image loads very slow and all application process also works slow.
I saw some post about this issue but could not find a proper solution.
I didn't understand the relation between the image and the other events.
For example, when I press a simple button, detection of the press action takes seconds if the image has set.
Sample code:
...
onPress1(){
alert('onPress..');
}
render(){
return(){
<View>
<View style={ somestyle }>
<Image source={require('./img/background.jpg')} />
</View>
<View style={ somestyle }>
<View style= {somestyle}>
<TouchableHighlight style={ somestyle } onPress={() => this.onPress1()}>
<Text style={ somestyle }>Btn 1</Text>
</TouchableHighlight>
</View>
</View>
</View>
}
}
...
Any suggestion ? Thank you very much.