Handling change in the layout orientation using the automatic layout system (Simple)
Another functionality that the framework provides is in handling of the change in the layout orientation. The framework re-renders the application when the layout's orientation is changed from portrait to landscape and vice versa.
How to do it...
Take a look at the same application containing the
Navbar
, aTabStrip
widget, and a list of elements inListView
.When you change the orientation of the device, the framework's layout engine will automatically position elements as shown in the following screenshot:
As shown in the previous screenshot, the layout changes to adapt to the new orientation.