Is it good to have a Base Activity class?

后端 未结 3 1982
情歌与酒
情歌与酒 2021-02-02 03:07

Is it good to have BaseActivity class and that will act as super class for all other activity. I need this to have some common implementations for the activities.

3条回答
  •  离开以前
    2021-02-02 03:55

    It all depends with your requirement, but for the sake of scalability it has always been handy to have a base class to put all your shared functions. I will hugely suggest to use abstract class just incase you need to define different implementation of shared behaviors, like getting the class name or screen name.

提交回复
热议问题