I am doing an animation of deck cards displayed in a circle.
In the onDraw method, I call canvas.drawBitmap method in a for loop, which means that every time the onDraw method is called, the for loop goes through an ArrayList of cards that have been taken from a deck and stored in this ArrayList and draws all of them.
The problem is that the animation starts to get slower as the number of cards in the ArrayList reaches about half of the deck.
Is there any way to display a card, and leave it in the canvas? In other words, is there a way to make the onDraw method only draw the new cards that are added to the ArrayList without going through the whole ArrayList again every time it draws the new card?