support different orientation and rotation

This is to support different orientation and rotation of device.