Open itshields opened 6 years ago
Some additional context, the layout in question contains one RecyclerView
with sticky headers in which the adapter provides the dataset via StickyHeaderHandler#getAdapterData
and another RecyclerView
that does not have sticky headers. One or the other is shown, so the sticky header RecyclerView
is sometimes hidden and when hidden findViewById(R.id.header_view).setVisibility = View.GONE
is called (and the reverse is called when the view is shown). ConstraintLayout
is used as the root layout for the header view holder as well as the root layout of the fragment containing the RecyclerViews
(although those are contained in a child FrameLayout
within the ConstraintLayout
). I do not have a specific repro case for this crash
So the layout for the Fragment that contains the RecyclerViews is:
<ConstraintLayout>
<FrameLayout>
<RecyclerView>
<RecyclerView>
?
Sort of. I'm defining the RecyclerViews in separate layouts and including them, and the second RecyclerView layout is more complex, but that one is not the one with sticky headers. Here's a little more detail on the layout hierarchy:
<ConstraintLayout>
<FrameLayout>
<include layout=list_1>
<include layout=list_2>
and then list_1, which is the one with sticky headers, looks like:
<merge>
<RecyclerView>
and list_2, (no sticky headers) looks like
<ConstraintLayout>
<LinearLayout>
<TextView>
<RecyclerView>
<View>
<ScrollView>
<ConstraintLayout>
<Custom View (FrameLayout subclass)>
<RecyclerView>