When developing for the android platform we can create two versions for the same layout xml document and keep them separately within ‘layout’ and ‘layout-land’ folders. When the android platform executes our application it will automatically use the correct version in according with the display orientation. The following video clip shows that.
The Visitor Design Pattern
The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.