rsktash
12/08/2021, 3:03 AMAndroidView(factory: ..)
inside Compose LazyList
As a workaround I checked duplicate ids and reset them to random id
Error message: IllegalArgumentException: Wrong state class, expecting View State but received class… This usually happens when two views of different type have the same id in the same hierarchy.Adam Powell
12/08/2021, 4:48 AMView.generateViewId()
and not rely on randomIan Lake
12/08/2021, 5:59 AMView.generateViewId()
isn't stable across configuration changes (it is just a static, ever increasing counter that never gives you the same number back), so if you actually want your state restored correctly, you can't use that eitherAdam Powell
12/08/2021, 6:02 AM