October 2018
Intermediate to advanced
464 pages
15h 17m
English
Although the Android framework will automatically load new resources (such as the layout) upon orientation changes, there are times when you may wish to disable this behavior. If you wish to be notified of an orientation change instead of Android handling it automatically, add the following attribute to the Activity in the Android Manifest:
android:configChanges="keyboardHidden|orientation|screenSize"
When any of the following configuration changes occur, the system will notify you through the onConfigurationChanged() method instead of handling it automatically:
The onConfigurationChanged() signature is as follows:
onConfigurationChanged (Configuration newConfig)
You'll ...