使用
baseRecyclerViewAdapterHelper设置emptyview
方法1: 1.mAdapter.bindToRecyclerView(mMyRecycleMm);先绑定 2.mAdapter.setEmptyView(R.layout.empty_view);在设置 方法2: 直接使用mAdapter.setEmptyView(R.layout.empty_view,mMyRecycleMm);
inner class MaintainCleanViewHolder2(view: View) : RecyclerView.ViewHolder(view) { var ivArrow: View? = null var imageView: ImageView? = null var tvtitle: TextView? = null var tvNextTime: TextView? = null var progressBar: ProgressBar? = null init { imageView = view.findViewById(R.id.iv_icon) tvtitle =findViewById(R.id.tv_title) progressBar =findViewById(R.id.progress_plan) tvNextTime =findViewById(R.id.tv_next_time) ivArrow = findViewById(R.id.iv_arrow) } }导致
因为忘记用view去找到指定的id所以必须加上view。findview