☠🇷
Size: a a a
☠🇷
n
☠🇷
n
☠🇷
☠🇷
D
n
☠🇷
☠🇷
☠🇷
PS
PS
☠🇷
☠🇷
☠🇷
PS
PS
☠🇷
☠🇷
com.github.florent37.expansionpanel.ExpansionLayout
? Интересует автоматический коллапс остальных элементов ресайклераprivate fun collapseOther(position: Int) {
rvUSs.adapter?.itemCount?.let { size ->
for (i in 0 until size) {
if (i != position) {
if (rvUSs.getChildAt(i)?.findViewById<ExpansionLayout>(R.id.expansionLayout)?.isExpanded == true) {
rvUSs.getChildAt(i)?.findViewById<ExpansionLayout>(R.id.expansionLayout)?.toggle(true)
}
}
}
}
}
expansionLayout.addListener { _, expanded ->
if (expanded) {
collapseOther?.invoke(position)
}
}