我的应用程序有问题:由于 AndroidBug5497Workaround,Version >= Lollipop 出现了奇怪的行为。
我正在使用协调器布局、折叠工具栏、 fragment 、 float 操作按钮和 snackbar ,在 Lollipop 前一切正常。
我需要通过键盘显示我的 Fab,并且我使用 AndroidBug5497Workaround。 (根据 Joseph Johnson's solution )
但是有了这个解决方案,快餐店变得疯狂了。
我正在使用所有 android 的支持库 23.2.+,并且在我的 list 中我设置了 android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
对于这个 Activity
这就是我的 Activity 结构:
<Coordinator Layout>
<Collapsing Toolbar />
<Linear Layout>
<Fragment />
</Linear Layout>
<Floating Action Button />
</Coordinator Layout>
这就是 fragment :
<Linear Layout>
<Nested Scroll View>
<Linear Layout>
<CardView 1/>
<CardView 2/>
<CardView n/>
</Linear Layout>
</Nested Scroll View>
</Linear Layout>
任何帮助将不胜感激。
非常感谢。
最佳答案
尝试在 list 的 Activity 中使用以下内容
android:windowSoftInputMode="adjustResize"
关于带有 FAB 的键盘上方的 Android SnackBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36137459/