I'm using `RecyclerView` to which I attach a `LinearLayoutManager` and a `RecyclerView.Adapter`

```
    RecyclerView conversationList = (RecyclerView)findViewById(R.id.conversationList);
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    conversationList.setLayoutManager(layoutManager);
    MessagesAdapter adapter = new MessagesAdapter();
    conversationList.setAdapter(adapter);

```

In `onBindViewHolder` of `RecyclerView.Adapter` I'm passing the adapter item object to the view by using setTag:

```
    @Override
    public void onBindViewHolder(ViewHolder viewHolder, int position) {
        viewHolder.itemView.setTag(getItem(position));
        ...
    }

```

I'm iterating over child views of the `layoutManager` and get the needed object by using the `getTag` method

```
        for (int i = 0; i < layoutManager.getChildCount(); i++) {
            LinearLayout container = (LinearLayout)layoutManager.getChildAt(i);
            LinearLayout container2 = (LinearLayout)container.getChildAt(0);
            Object tag = container2.getTag();
        }

```

It doesn't seem right to me. Is there a better way of doing this?