react-native - 按下 InputText 后 ImageBackground 移动
问题描述
您好,我刚开始使用 React Native,我想使用图像作为背景,但是当按下输入文本时,图像会向上移动一点,我想修复它。
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%'
}
})
有什么建议吗?
解决方案
推荐阅读
- google-bigquery - 如何预处理来自 Stackdriver 的 BigQuery 数据
- node.js - 有没有办法查询时间戳中有特定毫秒的文档?[蒙古]
- php - 将 StdClass 对象类型转换为数组
- html - 悬停效果+img上的超链接
- qt - 如何检查 QObject 是否是 QObject 的后代?
- python - 合并多个列表中包含的数据
- reactjs - Hooks API - 在等待语句后设置状态时避免状态覆盖
- r - 替换此列表中的 for-loop
- azure - 是否可以从流分析中调用 cosmos db 触发器?
- google-cloud-platform - 如何设置多区域 GCP 部署?