Skip to content Skip to sidebar Skip to footer

Recyclerview Parameters Stick Around After Re-drawing The List

So, I've got a RecyclerView with some textviews on the cards. One of these can turn red&bold, based on some parameters, using holder.DeviceTV.setTextColor(Color.RED); & hol

Solution 1:

You would need to call holder.DeviceTV.setTextColor(Color.BLACK) and holder.DeviceTV.setTypeface(null); in the onBindViewHolder method to make sure everything is displayed as you want.

There might be a small overhead to that but it's definitely much faster than creating a new View from scratch.

Post a Comment for "Recyclerview Parameters Stick Around After Re-drawing The List"