RecyclerTreeView
RecyclerTreeView copied to clipboard
LayoutItemType.getLayoutID() should by LayoutItemType.getViewType()
LayoutItemType must implement a "fun getLayoutID() : Int".
a) Most of the time, it is not used as a layout ID but just as a convenient value for itemViewType b) Hardcoding layout IDs prevents the use of ViewBinding to instantiate layouts.
Instead we could give the TreeViewBinder a function to instantiate a new view with a default implementation that inflates a layout.
This way the provideViewHolder() method can be given a view of a specific type and thus increase type safety and null safety.