Can I combine my code into some kind of “global activity”?

后端 未结 3 1372
再見小時候
再見小時候 2020-12-06 15:08

Is there any global activity on Android such that I put my code in that one activity, and it affects all activities in my project? This occurs to me because the same code is

3条回答
  •  抹茶落季
    2020-12-06 15:44

    Take your first main activity write code there, and simply after that extend all the other activity with this activity.....e.g. MainActivity is your first and main activity then write this code there, and after that simply take an activity say it First then extend it with MainActivity rather than Activity...!! and That's it..........

提交回复
热议问题