onAdapterChanged

Called if the RecyclerView this LayoutManager is bound to has a different adapter set via setAdapter or swapAdapter. The LayoutManager may use this opportunity to clear caches and configure state such that it can relayout appropriately with the new data and potentially new view types.

The default implementation removes all currently attached views.

Parameters

oldAdapter

The previous adapter instance. Will be null if there was previously no adapter.

newAdapter

The new adapter instance. Might be null if setAdapter is called with null.