I have a grid of pixels being displayed using a RecyclerView (as shown in image). When the button is pushed, most of the pixels will be changing colors. I want this update to process each pixels color change more uniformly, even if it takes a very long time to complete (there may be hundreds of thousands of pixels) without blocking the main thread. How is this possible?
If possible I'd like a smooth flow as individual pixels change. The most important thing here is not completing the action quickly but smoothly. I'm not attached to RecyclerView if this isn't the best choice - I was just lead to believe it would be better for performance. I don't need listeners of any kind for the cells. Eventually the cells will become more complex, each housing other cells (Layered Views with background colors). I will be using an SQL database and the Room library for data storage and edit.
The process should be happening over a background thread so as not to halt the UI. Currently I am updating my RecyclerView via myRecyclerAdapter.notifyItemChanged(i);
on the onClickListener of the button and my UI will halt while it completes.