Setting app:layout_behavior programmatically
问题 I have a coordinator layout with a recyclerview which I would like to add programmatically. The reason why it's added programatically is because different fragments which inflate the coordinator layout, may use different types of recyclerviews. Typically for a recyclerview, in order to set this behaviour I would add it in the xml: app:layout_behavior="@string/appbar_scrolling_view_behavior" That works fine. However, I'm at a complete loss as to how to add this behavior when I create the