March 2016
Intermediate to advanced
428 pages
9h 2m
English
Although the Android framework will automatically load a new resource (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 the 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:
keyboardHiddenorientationscreenSizeThe onConfigurationChanged() signature is as follows:
onConfigurationChanged (Configuration newConfig)
You'll find the new orientation ...
Read now
Unlock full access