anudeep
anudeep

Reputation: 11

How to update a view in particular position in recycler view?

I have a recycler view in that i have many rows.each row has many items.onclick of one item in a row,I need to change the view of that row based on particular position.As,I am new to android,can anyone help me.

Upvotes: 0

Views: 1255

Answers (2)

Ravi Theja
Ravi Theja

Reputation: 3401

Assuming you have your data in an ArrayList update the data of that particular position in ArrayList and call adapter.notifyItemChanged(position) and in your bindViewHolder handle what you have to show by the value changed.

Upvotes: 2

Sanif SS
Sanif SS

Reputation: 652

You can use adapter.notifyItemChanged(int position)

Upvotes: 1

Related Questions