Is it possible to implement dark mode on multiple activities with a single toggle switch ? Or it is only possible with the help of fragments.

Please bear with me, I am new to Android development and a total beginner.