Made setOrientation public so it is possible to detect orientation changes.