I created a custom View by extending from View. In onDraw() I managed to draw some circles and other stuff. But now I want to add a background from a resource (sd card or a
I'm afraid that you get OutOfMemoryError, cause onDraw is called many times during view lifecycle, and every time you are allocating memory for new bitmap. Just make bg member (maybe - static) of your class and load it only once - in your view's constructor. And don't forget to recycle bitmap on view's detaching.