Android - Can't Apply Decorator Pattern on Activities?
问题 I would like to be able to dynamically build an Activity that has a few of the capabilities that we have (such as prevent scrolling, monitors internet connectivity, prevent orientation change, etc.). We don't want to have to create an abstract BaseActivity that contains all possible properties and abstract methods for all capabilities. We would have a lot of empty function implementations in subclasses of BaseActivity who only need to actually implement a few of those functions. Worse yet, if