I am trying to get child view by position. I could get view when one item is clicked:
rvSellRecords.addOnItemTouchListener(new RecyclerItemClickListener(getActivity(), new RecyclerItemClickListener.OnItemClickListener() { @Override public void onItemClick(View view, int position) { ((MainActivity) getActivity()).showSellRecordFragment(position, view); } })); Now I cannot get child view, without click - let's say by position for example:
rvSellRecords.someMagicalMethodWhichReturnsViewByPosition(5); Question: How to get child view from RecyclerView?
EDIT FOR BOUNTY:
I have RecyclerView to show products list. When I click on it, I am adding new Fragment where I show product information. While opening I am updating toolbar with view from RecyclerView - this is working perfectly:
rvSellRecords.addOnItemTouchListener(new RecyclerItemClickListener(getContext(), new RecyclerItemClickListener.OnItemClickListener() { @Override public void onItemClick(View view, int position) { sellPresenter.onSellRecordSelected(position, view); } })); When I click blue button with "+", I am incrementing quantity by 1. public void onIncrementButtonClicked(){ sellRecord.setCount(sellRecord.getCount() + 1); showQuantity(); bus.post(new SellRecordChangedEvent(sellRecord, sellRecordPosition)); } Then I am posting updated sellRecord to first fragment using EventBus. There I am updating list data. I supposed that updating value(sell) automatically updates adapter. Now I am getting view from adapter using custom method(getView) which was created by me(you can find it below). @Subscribe public void onEvent(SellRecordChangedEvent event){ sell.getSellRecords().set(event.getSellRecordPosition(), event.getSellRecord()); sell.recalculate(); int position = event.getSellRecordPosition(); View view = adapter.getView(position); bus.post(new TransactionTitleChangedEvent(null, view)); } This is my adapter class - I changed adapter little bit to collect view in list and added method which returns view for respective position: public class SellRecordsAdapter extends RecyclerView.Adapter<SellRecordsAdapter.ViewHolder> { ..... ..... ..... List<View> viewList; public SellRecordsAdapter(List<SellRecord> sellRecordList) { ..... viewList = new ArrayList<>(); } ..... ..... ..... @Override public void onBindViewHolder(ViewHolder viewHolder, int i) { ..... ..... ..... viewList.add(i, viewHolder.itemView); } public View getView(int position){ return viewList.get(position); } } My problem: when I updating view in toolbar, I am getting old view. When quantity is 3, I am getting view with 2. When quantity 10 - view is with 9.
My question: how to get view from recycler view using position of item(without on click listener)?


event.getSellRecordPosition(), but you are not notifying the adapter that its dataset changed, either byadapter.notifyDataSetChanged()or the othernotifyItemChanged(position)methods