By default screen rotation is enabled on Android HTC One, and the screen rotates as you rotate the phone. To turn off or disable screen rotation on HTC do as follows:
1. Open "Settings" app
2. Tap "Display, gestures and buttons"
3. to disable auto rotation, unmark "Auto Rotate Screen"