回收被键盘覆盖的孩子



我有一个具有RecycleView的活动。此RecycleView的子项包含radioGroup中的单选按钮,当上次选择单选按钮时,它将显示EditText。这是布局:

<LinearLayout>
<Toolbar/>
<RelativeLayout
width:match_parent
height:match_parent>
<RecycleView
width:match_parent
height:match_parent
above:footer/>
<LinearLayout
id:footer
width:match_parent
height:wrap_content>
<Button/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>

当我向下滚动到最后一个孩子时,问题就出现了。它被键盘盖住了。

这是每个单元格的布局:

<LinearLayout>
<RadioGroup/>
<EditText/>
</LinearLayout>

我试着使用"调整大小",当键盘出现时,应该会调整用户界面的大小。但最后一个孩子仍然被遮住了。有人有其他解决方案吗?

尝试android:windowSoftInputMode="adjustPan"

我从这篇文章中得到了解决方案看看honeal的答案。因此,基本上你不能在使用"AdjustResize"时将活动设置为全屏(在你的主题中(

最新更新