How to get view from RecyclerView at specific adapter position and get values from those views?

你说的曾经没有我的故事 提交于 2019-11-30 21:15:45

Try this use recyclerView.getLayoutManager().findViewByPosition(int position) to get particular row of recyclerView

View row = recyclerView.getLayoutManager().findViewByPosition(0);
TextView textView = row.findViewById(R.id.YourTextviwID);
textView.setText("Nilu");
ImageView textView = row.findViewById(R.id.YourImageViewID);
imageView.setBackgroundResource(R.mipmap.ic_launcher);

NOTE :- only item that is display in screen when you scroll recyclerView than item will removed from memory

EDIT :- you can write a public method in adapter to get your arraylist in your activity where you can check your flag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!