Friday, 6 February 2015

About Responding to configuration change of device in Android .

* When an application is running on a device, and the device's configuration changes ( for e.g. is rotated 90 degrees ), your application needs to respond accordingly.

* For example, switching from portrait to landscape mode means the screen went from being tall and narrow to being short and wide.

* The UI elements (buttons, text, lists, and so on) will need to be rearranged, resized, or even removed to accommodate the new configuration.

* In android, a configuration change causes the current activity to go away and be recreated.

* The application itself keeps on running, but it has the opportunity to change how the activity is displayed in response to the configuration change.

* Be aware that configuration changes can take on many forms, not just device rotation.

* If a device is connected to a dock, that's also a configuration change.So is changing the language of the device.

* Whatever the new configuration is, as long as you've designed your activity for that configuration,
android takes care of most everything to transition to it, giving the user a seamless experience.

No comments:

Post a Comment