Using onSaveInstanceState to deal with Device Rotation Changes in Android Studio (Kotlin 2020)
Channel: Indently
Date: 2020-04-29

This is one of the easiest ways to do it, although I do not recommend it too much for building complex apps, because it just becomes another line of code that you have to continuously go back and maintain.    
  ​​​​