I think I\'ve read pretty much all the answers to all of the similar SO questions, and NONE of them seem to be working for me. It\'s drivin
That was a react-native issue ¯\_(ツ)_/¯
.
I've resolved this by intercepting requestLayout
like so:
protected boolean mRequestedLayout = false;
@Override
public void requestLayout() {
super.requestLayout();
// We need to intercept this method because if we don't our children will never update
// Check https://stackoverflow.com/questions/49371866/recyclerview-wont-update-child-until-i-scroll
if (!mRequestedLayout) {
mRequestedLayout = true;
this.post(new Runnable() {
@SuppressLint("WrongCall")
@Override
public void run() {
mRequestedLayout = false;
layout(getLeft(), getTop(), getRight(), getBottom());
onLayout(false, getLeft(), getTop(), getRight(), getBottom());
}
});
}
}
FINALLY it works.. Credit goes to this unsung hero who discovered the workaround.