mirror of
https://github.com/leaf-wai/StackLayoutManager.git
synced 2026-04-09 20:52:49 +08:00
Merge pull request #1 from egeniq-forks/develop/fix_crash
Fix crash if adapter is empty
This commit is contained in:
@ -278,6 +278,10 @@ class StackLayoutManager(scrollOrientation: ScrollOrientation,
|
||||
}
|
||||
|
||||
override fun onLayoutChildren(recycler: RecyclerView.Recycler, state: RecyclerView.State) {
|
||||
if (itemCount == 0) {
|
||||
return
|
||||
}
|
||||
|
||||
mLayout?.requestLayout()
|
||||
|
||||
removeAndRecycleAllViews(recycler)
|
||||
|
||||
Reference in New Issue
Block a user