【发布时间】:2017-05-25 19:54:23
【问题描述】:
我有一个 RecyclerView,首先它向下滚动,现在当我们向上滚动时,它到达最高点。我想检测到。有什么办法吗?我有高度大于设备宽度的 AppBar。所以它会导致滚动。我想通过手动扩展 AppBar 来获得顶级监听器来避免投掷。
if (layoutManager.firstCompletelyVisibleItemPosition() == 0) {
//this is the top of the RecyclerView
}
这个代码我已经使用过了,但我的问题是我在放置这个代码后无法向上滚动 RecyclerView。因为我的 RecyclerView 使用 GridLayoutManager 和 3 列。
【问题讨论】:
-
我已经编辑了我的问题
标签: android android-recyclerview android-appbarlayout onscrolllistener