I am experimenting with integrating a Firebase-backed RecyclerView in a React Native app. With hardcoded data it works well, but upon inserting rows loaded dynamically and c
The root view in ReactNative is ReactRootView which onlayout
is an empty method.
when call notifyDatasetChanged
in RecyclerView, it's actually request layout
to relayout its children. And the layout method will call super.layout
to travel the whole view tree first. So that't a problem when the root view is ReactRootView.
You can manually call RecyclerView.onlayout(boolean changed, int l, int t, int r, int b)
to trigger its children relayout to make notifyDatasetChanged work.