React-Native 设置背景图片--ImageBackground
在RN版本0.46版本的时候添加了ImageBackground控件。ImageBackground可以设置背景图片,使用方法和image一样,里面嵌套了其他的组件
<ImageBackground style={
{ flex: 1 }}
source={require('../../res/image/login_beijing.png')}>
<View style={styles.connect} >
<View style={styles.oneline} >
<Image style={
{ height: 25, width: 25, alignItems: 'center' }}
source={require('../../res/image/icon_yanzhengma.png')}
/>
<TextInput
ref='accountInputRef'
style={styles.input}
placeholder='请输入账号'/>
</View>
</View>
</ImageBackground>
还没有评论,来说两句吧...