Closed DuShuYuan closed 3 years ago
比如 showLoadingView 后 获取 contentView 中的recyclerView 就报错 100%报错 代码: override fun initView() { showLoadingView() rec.layoutManager = LinearLayoutManager(mContext) } 报错 java.lang.IllegalStateException: rec must not be null
切换状态是用 removeView 和 addView 的方式实现的,建议 showLoadingView() 在请求的时候才调用
比如 showLoadingView 后 获取 contentView 中的recyclerView 就报错 100%报错 代码: override fun initView() { showLoadingView() rec.layoutManager = LinearLayoutManager(mContext) } 报错 java.lang.IllegalStateException: rec must not be null