Which way is better to hide and show Android Dialogs? There won't be stored any reference in the class to make a leak, so just give your advice with an explanation concerning to this.
- Write an Utility class with static methods?
- Write an Utility class which needs to be used as an instance without static methods.
And of course instead of down voting or even if you do, please explain why it is bad at all this way?
My purpose is to do this for reusing the code. To not write the same stuff in every Fragment
or Activity
.