import androidx.recyclerview.widget.DividerItemDecoration; 看下有没有这个引入
JAVA中boolean对象有默认值为false
所以计算高度的代码不能只执行一次,还是要放到
onBindViewHolder
方法里去多次执行.