Note: I post this answer if someone in the future face the same problem as me. For me the following line wasn't enought:
android:configChanges="orientation"
When I rotated the screen, the method `onConfigurationChanged(Configuration newConfig) did't get called.
Solution: I also had to add "screenSize" even if the problem had to do with the orientation. So in the AndroidManifest.xml - file, add this:
android:configChanges="keyboardHidden|orientation|screenSize"
Then implement the method onConfigurationChanged(Configuration newConfig)