Any reason why LazyList's `CollectionInfo` doesn't...
# compose-android
a
Any reason why LazyList's
CollectionInfo
doesn't use item counts from
state.layoutInfo.totalItemsCount
? Rows/columns are always -1 for lazy lists, which makes testing for number of children difficult. RecyclerView, for example, had the correct counts taken from the adapter.
s
Sounds like an oversight, please file a bug
a
Not sure if it's the reason, but it didn't quite work when I test it in my own lazy layout. If you have a lazy list of say 10 items and set the correct item count, Talkback will always announce "1 of 10" for the first visible item, which means the first item can change when you scroll the list. Same behavior even if I set the correct
CollectionItemInfo
for each item.