I have an Android custom view that displays a grid of images downloaded from a server. The images are downloaded in the background, after an image has been downloaded, it is added to a list an view redraw is triggered.
So each time an image is downloaded, I draw a background and then the images in the list. This approach causes some flicker to appear. Plus I find it inefficient to draw all images just for one new image.
Is it possible to draw something in the view outside the OnDraw event? Thus I would draw only the newly downloaded image, instead of the whole list.
With Windows Forms I can do this outside the Paint event:
Graphics g = this.CreateGraphics(); // this being a Control (<=> View), Graphics <=> Canvas
g.DrawSomething()
g.Dispose()
Is something similar available in Android or my approach is incorrect?