I am making a custom view and I am overriding its onDraw method. In the onDraw method I am scaling a Bitmap, with the createBitmap function. This works perfectly fine. However, Android Studio gives a warning when doing this, namely: avoid object allocations during draw/layout operations.
Is there another way to scale a bitmap, without creating a new bitmap? What is best practise in this case?