我想改变其中item中布局中最右边的图片
下面这样是可以修改,但是如果position大于屏幕以外的话会出错,但如果先全部加载好的话不会有问题,有什么方法可以预先加载好Recyclerview?
View view = layoutManager.findViewByPosition(2);
LinearLayout layout = (LinearLayout)view;
ImageView imageView=(ImageView)layout.findViewById(R.id.reminder);
imageView.setImageResource(R.mipmap.waring);
adapter.notifyItemChanged(2);
弹出问题为:Attempt to invoke virtual method 'android.view.View android.widget.LinearLayout.findViewById(int)' on a null object reference