活动显示令人窒息的视图

时间:2018-07-17 11:14:04

标签: android android-activity android-recyclerview android-nestedscrollview

我试图正确显示布局,但有时显示不正确,我不知道发生了什么,我会尝试但是没有发现任何问题。

https://www.jerriepelser.com/blog/using-roles-with-the-jwt-middleware/我有时会得到

当我滚动时,它又能正常工作,请帮助我为什么有时会得到此输出

这是我的布局资源文件:

resources

我尽了一切,但我不明白为什么会这样。

1 个答案:

答案 0 :(得分:0)

尝试在锚定式滚动视图上放置锚点

<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/nested"
    android:layout_marginBottom="@dimen/_45sdp"
    app:behavior_overlapTop="@dimen/_34sdp"
    app:layout_anchor="@id/appbar"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">

以及您的CollapsingToolbarLayout为什么具有height = matchparent