我已经为我的看法决定的基本协调的布局被截断。我张贴我的简单的一个片段:部分在屏幕底部(安卓)
<ListView
android:id="@+id/transferList"
android:layout_width="match_parent"
android:layout_height="match_parent"></ListView>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_alignParentRight="true"
android:src="@drawable/ic_add_white" />
什么情况是,在FAB熄灭屏幕。这只是不是FAB,但其他具有cardviews/listviews的片段在屏幕底部被截断。我四处寻找解决方案,并提出了一个hacky解决方案:从工具栏删除财产应用程序:layout_scrollFlags =“scroll | enterAlways”。
我不明白是什么原因可能导致这种情况发生,以及如何解决上述问题。支持库中有一些错误吗?有没有更好的方法来解决这个问题?我遇到的另一个解决方案是从here - 将FAB按钮直接放在活动中的协调器布局下,并使其仅在您需要的片段中可见。对我来说,这似乎不是一个好的解决方案。另外,我的片段中的其他观点也被切断了。
我删除了'app:layout_scrollFlags =“scroll | enterAlways | snap”'并且滚动工作正常,底部没有被切断。只是想问一下这个变化有什么意义?你遇到过这个问题的其他解决方案吗? –
我发现只删除'scroll |'部分就足够了。希望通过这样做,会有比我完全删除'app:layout_scrollFlags'属性更少的可能影响(?) –