We've all been there,… reducing the number of overdraws or customizing image with little to none external libraries. This modern twist to this (and this) age-old article will surely help you with that.
I've managed to rewrite the example code in Kotlin so it's far more readable than Java-stic code and you can understand what is really going on just by glancing over it.

It is however backward compatible with Java, don't you worry! It utilizes simple builder which gets you to set up quickly and you'll get things done with just a few lines.