Closed frazer-rbsn closed 7 years ago
Happens for me too. @TonicArtos Any plan on fixing this?
We also have this issue. @frazer-rbsn @gatorboy have you found a work around for it?
@sofiahellofresh I was able to write some workaround for this..
final View view = layoutManager.getChildAt(layoutManager.getChildCount() - 1);
int lastVisiblePosition;
if (view == null) {
lastVisiblePosition = 0;
} else {
lastVisiblePosition = layoutManager.findLastCompletelyVisibleItemPosition();
if (lastVisiblePosition == LayoutManager.INVALID_POSITON) {
lastVisiblePosition = 0;
}
}
This only happens when we redraw the layout after a screen rotation. It doesn't happen every time and doesn't happen for every user, which makes me think it could be a race condition. But a colleague with a slow device can reproduce it almost every time.
Here's how we are calling the code:
We are using version 0.4.13 and it has been seen on Android 4 and 5.