I have a RecycleView . I updated its adapter, and call
notifydatasetchanged()
. I want to wait until the list finishes drawing
I have a RecycleView . I updated its adapter, and call
notifydatasetchanged()
. I want to wait until the list finishes drawing
try this one.
recyclerView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
//At this point the layout is complete and the
//dimensions of recyclerView and any child views are known.
}
});