5

我的应用程序有问题:由于 AndroidBug5497Workaround,Version >= Lollipop 出现了奇怪的行为。

我正在使用协调器布局、折叠工具栏、片段、浮动操作按钮和小吃栏,在棒棒糖前一切正常。我需要通过键盘显示我的 Fab,并且我使用 AndroidBug5497Workaround。(根据约瑟夫约翰逊的解决方案

但是有了这个解决方案,快餐店变得疯狂了。我正在使用所有 android 的支持库 23.2.+,并且在我的清单中我已经android:windowSoftInputMode="stateAlwaysHidden|adjustResize"为此活动设置

这就是我的活动结构:

<Coordinator Layout>
    <Collapsing Toolbar />
    <Linear Layout>
       <Fragment />
    </Linear Layout>
    <Floating Action Button />
</Coordinator Layout>

这就是片段:

<Linear Layout>
    <Nested Scroll View>
        <Linear Layout>
            <CardView 1/>
            <CardView 2/>
            <CardView n/>
        </Linear Layout>    
    </Nested Scroll View>
</Linear Layout>

任何帮助将不胜感激。非常感谢。

没有键盘的正常行为

棒棒糖前行为 棒糖

4

1 回答 1

1

尝试在清单的活动中使用以下内容

android:windowSoftInputMode="adjustResize"
于 2017-11-26T16:26:52.727 回答