javascript - KeyboardAvoidingView 内具有绝对位置的按钮“覆盖”其他元素
问题描述
我有一个绝对位置的按钮,用于表单。在 KeyboardAvoidingView 内部时,它位于其他元素之上
const BtnContainer = styled.View`
position: absolute;
bottom: 38px;
left: 16px;
width: ${Dimensions.get('window').width - 32};
`
<KeyboardAvoidingView
behavior="padding"
enabled
style={{ flex: 1 }}
keyboardVerticalOffset={60}
>
// form content
<BtnContainer>
<Button
text={getButtonLabel()}
disabled={!isButtonEnabled()}
onPress={stepChangeCallBack}
/>
</BtnContainer>
</KeyboardAvoidingView>
我试过behavior="position"
了,它破坏了所有的布局,behavior="height"
也不起作用。
解决方案
推荐阅读
- php - 从 php 中的站点中删除 index.php
- javascript - Meteor + LitElement (Polymer 3) 导入问题
- azure - Azure Key Vault 中的最大机密数?
- android - 为什么使用“--prod --release android”构建的 Ionic 3 apk 会给 Google Playstore 错误,即 apk 在调试模式下签名?
- javascript - 使用 javascript 的删除数据功能只能工作一次
- tfs - 从 TFS 2017 中的 AreaID 获取区域详细信息
- javascript - 使用 JavaScript 拦截网页中接收到的数据
- django - 使用 Django ManyToManyField 检查实例是否存在
- machine-learning - 管道中 CountVectorizer 的 Sklearn NotFittedError
- python - 栅格化几何示例不起作用