I have an abstract class that is somewhat like a View from Android. I create a lot of classes that extend it to draw different stuff. Now i would like all those classes to share the same Paints so that colors match and so on.
My ideas would be
pass some context or windowmetrics to every single constructor, but that feels silly as i only need it once.
i could add a static method init() to the abstract class, but i try to avoid public static methods.
create a subclass with the single purpose to set the static members of the superclass and also null them at the end, something like a remote control to the superclass' static stuff.
im just not sure what risks there are or if there are even simpler ways to do it.
Edit: to init the static members i need a context (for those not familiar with android) and that context needs to be passed to that class, so no init in static blocks etc