sketchub icon

Detect Screen Orientation - onConfigurationChanged

ElFilibusterismo
25 Likes
0 Comments
270 Downloads

What's new

Handle configuration changes

onConfigurationChanged

Screenshots

About

onConfigurationChanged

Called by the system when the device configuration changes while your activity is running. Note that this will only be called if you have selected configurations you would like to handle with the R.attr.configChanges attribute in your manifest. If any configuration change occurs that is not selected to be reported by that attribute, then instead of reporting it the system will stop and restart the activity (to have it launched with the new configuration).

At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration.

©2026 Sketchub | User Policy