你的RecyclerView的adapter进行了两次初始化,并且这两次初始化时间间隔比较短,所以会闪。
解决办法:
if (adapter == null) {标签:初始化,adapter,闪屏,闪动,android,RecyclerView From: https://www.cnblogs.com/zuiniub/p/16720583.html
adapter = ElectLetAdapter(context)
binding.recyclerView.adapter = adapter
}
adapter.setData(dataList)