Perhaps one of the most useful features of the smartphone is the device's ability to detect its own screen orientation with regard to the user. Although much of this can be handled automatically when a user turns their device around, it is very useful at times to be able to take control of the process.
By informing the system through our manifest and overriding activity callbacks we can include code that will run when the device is rotated.
We are going to take over from the system's automatic handling of screen orientation with a callback method, but first we have to inform Android of this, which we do through our manifest. We will also need some way to observe results, so start up a new Android project in Eclipse and create a
TextView with an ID in main.xml
.