【问题标题】:Android SnackBar above keyboard with FAB带有 FAB 的键盘上方的 Android SnackBar
【发布时间】:2016-07-08 08:10:49
【问题描述】:

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

我正在使用协调器布局、折叠工具栏、片段、浮动操作按钮和小吃栏,在棒棒糖前一切正常。 我需要通过键盘显示我的 Fab,并且我使用 AndroidBug5497Workaround。 (根据Joseph Johnson's solution

但是有了这个解决方案,快餐店变得疯狂了。 我正在使用所有 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>

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

【问题讨论】:

  • 我也遇到了同样的问题,如果你有解决办法,请在这里分享?
  • 没有。我使用对话框来“解决”问题

标签: android android-layout floating-action-button android-snackbar coordinator-layout


【解决方案1】:

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

android:windowSoftInputMode="adjustResize"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-22
    • 2019-09-26
    • 2016-03-15
    相关资源
    最近更新 更多