Merge pull request #6160 from ByteHamster/fix-empty-screen-scrolled
Fix toolbar on empty screen being set to scrolled state
This commit is contained in:
commit
a15d94c94c
|
@ -28,7 +28,9 @@ public class LiftOnScrollListener extends RecyclerView.OnScrollListener
|
|||
|
||||
private boolean isScrolled(RecyclerView recyclerView) {
|
||||
int firstItem = ((LinearLayoutManager) recyclerView.getLayoutManager()).findFirstVisibleItemPosition();
|
||||
if (firstItem != 0) {
|
||||
if (firstItem < 0) {
|
||||
return false;
|
||||
} else if (firstItem > 0) {
|
||||
return true;
|
||||
}
|
||||
View firstItemView = recyclerView.getLayoutManager().findViewByPosition(firstItem);
|
||||
|
|
Loading…
Reference in New Issue