title: How to switch themes (night mode) without restarting the activity?
body: <p>I have made a few apps that support multiple themes, but I always had to restart the app when user switches theme, because <code>setTheme()</code> needs to be called before <code>setContentView()</code>.</p>
  
  <p>I was okay with it, until I discovered this app. It can seamlessly switch between two themes, and with transitions/animations too!</p>
  
  <p><img src="https://i.stack.imgur.com/gHMpn.gif" alt="enter image description here"></p>
  
  <p>Please give me some hints on how this was implemented (and animations too). Thanks!</p>